diff mbox series

[V1,net-next,6/8] net: ena: enable support of rss hash key and function changes

Message ID 1594321503-12256-7-git-send-email-akiyano@amazon.com
State Changes Requested
Delegated to: David Miller
Headers show
Series ENA driver new features | expand

Commit Message

Kiyanovski, Arthur July 9, 2020, 7:05 p.m. UTC
From: Arthur Kiyanovski <akiyano@amazon.com>

Add the rss_configurable_function_key bit to driver_supported_feature.

This bit tells the device that the driver in question supports the
retrieving and updating of RSS function and hash key, and therefore
the device should allow RSS function and key manipulation.

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
---
 drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 5 ++++-
 drivers/net/ethernet/amazon/ena/ena_netdev.c     | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski July 9, 2020, 8:23 p.m. UTC | #1
On Thu, 9 Jul 2020 22:05:01 +0300 akiyano@amazon.com wrote:
> From: Arthur Kiyanovski <akiyano@amazon.com>
> 
> Add the rss_configurable_function_key bit to driver_supported_feature.
> 
> This bit tells the device that the driver in question supports the
> retrieving and updating of RSS function and hash key, and therefore
> the device should allow RSS function and key manipulation.
> 
> Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>

Is this a fix of the previous patches? looks strange to just start
advertising a feature bit but not add any code..
Machulsky, Zorik July 10, 2020, 7:53 p.m. UTC | #2
On 7/9/20, 1:24 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:

    On Thu, 9 Jul 2020 22:05:01 +0300 akiyano@amazon.com wrote:
    > From: Arthur Kiyanovski <akiyano@amazon.com>
    >
    > Add the rss_configurable_function_key bit to driver_supported_feature.
    >
    > This bit tells the device that the driver in question supports the
    > retrieving and updating of RSS function and hash key, and therefore
    > the device should allow RSS function and key manipulation.
    >
    > Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>

    Is this a fix of the previous patches? looks strange to just start
    advertising a feature bit but not add any code..

The previous related commits were merged already:
0af3c4e2eab8 net: ena: changes to RSS hash key allocation
c1bd17e51c71 net: ena: change default RSS hash function to Toeplitz
f66c2ea3b18a net: ena: allow setting the hash function without changing the key
e9a1de378dd4 net: ena: fix error returning in ena_com_get_hash_function()
80f8443fcdaa net: ena: avoid unnecessary admin command when RSS function set fails
6a4f7dc82d1e net: ena: rss: do not allocate key when not supported
0d1c3de7b8c7 net: ena: fix incorrect default RSS key

This commit was not included by mistake, so we are adding it now.
Jakub Kicinski July 10, 2020, 8:05 p.m. UTC | #3
On Fri, 10 Jul 2020 19:53:46 +0000 Machulsky, Zorik wrote:
> On 7/9/20, 1:24 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:
> 
>     On Thu, 9 Jul 2020 22:05:01 +0300 akiyano@amazon.com wrote:
>     > From: Arthur Kiyanovski <akiyano@amazon.com>
>     >
>     > Add the rss_configurable_function_key bit to driver_supported_feature.
>     >
>     > This bit tells the device that the driver in question supports the
>     > retrieving and updating of RSS function and hash key, and therefore
>     > the device should allow RSS function and key manipulation.
>     >
>     > Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>  
> 
>     Is this a fix of the previous patches? looks strange to just start
>     advertising a feature bit but not add any code..
> 
> The previous related commits were merged already:
> 0af3c4e2eab8 net: ena: changes to RSS hash key allocation
> c1bd17e51c71 net: ena: change default RSS hash function to Toeplitz
> f66c2ea3b18a net: ena: allow setting the hash function without changing the key
> e9a1de378dd4 net: ena: fix error returning in ena_com_get_hash_function()
> 80f8443fcdaa net: ena: avoid unnecessary admin command when RSS function set fails
> 6a4f7dc82d1e net: ena: rss: do not allocate key when not supported
> 0d1c3de7b8c7 net: ena: fix incorrect default RSS key

These commits are in net.

> This commit was not included by mistake, so we are adding it now. 

You're adding it to net-next.
Machulsky, Zorik July 10, 2020, 8:31 p.m. UTC | #4
On 7/10/20, 1:05 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:

    On Fri, 10 Jul 2020 19:53:46 +0000 Machulsky, Zorik wrote:
    > On 7/9/20, 1:24 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:
    >
    >     On Thu, 9 Jul 2020 22:05:01 +0300 akiyano@amazon.com wrote:
    >     > From: Arthur Kiyanovski <akiyano@amazon.com>
    >     >
    >     > Add the rss_configurable_function_key bit to driver_supported_feature.
    >     >
    >     > This bit tells the device that the driver in question supports the
    >     > retrieving and updating of RSS function and hash key, and therefore
    >     > the device should allow RSS function and key manipulation.
    >     >
    >     > Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
    >
    >     Is this a fix of the previous patches? looks strange to just start
    >     advertising a feature bit but not add any code..
    >
    > The previous related commits were merged already:
    > 0af3c4e2eab8 net: ena: changes to RSS hash key allocation
    > c1bd17e51c71 net: ena: change default RSS hash function to Toeplitz
    > f66c2ea3b18a net: ena: allow setting the hash function without changing the key
    > e9a1de378dd4 net: ena: fix error returning in ena_com_get_hash_function()
    > 80f8443fcdaa net: ena: avoid unnecessary admin command when RSS function set fails
    > 6a4f7dc82d1e net: ena: rss: do not allocate key when not supported
    > 0d1c3de7b8c7 net: ena: fix incorrect default RSS key

    These commits are in net.

    > This commit was not included by mistake, so we are adding it now.

    You're adding it to net-next.
This commit actually enables a feature after it was fixed by previous commits, therefore we thought
that net-next could be a right place. But if you think it should go to net, we'll go ahead and resubmit 
it there. Thanks for your comments.
Kiyanovski, Arthur July 14, 2020, 11:20 a.m. UTC | #5
> -----Original Message-----
> From: Machulsky, Zorik <zorik@amazon.com>
> Sent: Friday, July 10, 2020 11:32 PM
> To: Jakub Kicinski <kuba@kernel.org>
> Cc: Kiyanovski, Arthur <akiyano@amazon.com>; davem@davemloft.net;
> netdev@vger.kernel.org; Woodhouse, David <dwmw@amazon.co.uk>;
> Matushevsky, Alexander <matua@amazon.com>; Bshara, Saeed
> <saeedb@amazon.com>; Wilson, Matt <msw@amazon.com>; Liguori, Anthony
> <aliguori@amazon.com>; Bshara, Nafea <nafea@amazon.com>; Tzalik, Guy
> <gtzalik@amazon.com>; Belgazal, Netanel <netanel@amazon.com>; Saidi, Ali
> <alisaidi@amazon.com>; Herrenschmidt, Benjamin <benh@amazon.com>;
> Dagan, Noam <ndagan@amazon.com>; Agroskin, Shay
> <shayagr@amazon.com>; Jubran, Samih <sameehj@amazon.com>
> Subject: Re: [EXTERNAL] [PATCH V1 net-next 6/8] net: ena: enable support of rss
> hash key and function changes
> 
> 
> 
> On 7/10/20, 1:05 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:
> 
>     On Fri, 10 Jul 2020 19:53:46 +0000 Machulsky, Zorik wrote:
>     > On 7/9/20, 1:24 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:
>     >
>     >     On Thu, 9 Jul 2020 22:05:01 +0300 akiyano@amazon.com wrote:
>     >     > From: Arthur Kiyanovski <akiyano@amazon.com>
>     >     >
>     >     > Add the rss_configurable_function_key bit to driver_supported_feature.
>     >     >
>     >     > This bit tells the device that the driver in question supports the
>     >     > retrieving and updating of RSS function and hash key, and therefore
>     >     > the device should allow RSS function and key manipulation.
>     >     >
>     >     > Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
>     >
>     >     Is this a fix of the previous patches? looks strange to just start
>     >     advertising a feature bit but not add any code..
>     >
>     > The previous related commits were merged already:
>     > 0af3c4e2eab8 net: ena: changes to RSS hash key allocation
>     > c1bd17e51c71 net: ena: change default RSS hash function to Toeplitz
>     > f66c2ea3b18a net: ena: allow setting the hash function without changing
> the key
>     > e9a1de378dd4 net: ena: fix error returning in ena_com_get_hash_function()
>     > 80f8443fcdaa net: ena: avoid unnecessary admin command when RSS
> function set fails
>     > 6a4f7dc82d1e net: ena: rss: do not allocate key when not supported
>     > 0d1c3de7b8c7 net: ena: fix incorrect default RSS key
> 
>     These commits are in net.
> 
>     > This commit was not included by mistake, so we are adding it now.
> 
>     You're adding it to net-next.
> This commit actually enables a feature after it was fixed by previous commits,
> therefore we thought that net-next could be a right place. But if you think it
> should go to net, we'll go ahead and resubmit it there. Thanks for your
> comments.

Jakub, 
I’ve removed the patch from v2 but it seems to me there was some miscommunication and IMO the correct place for the patch should be net-next. 
This feature was actually turned off until now, and this patch turns it on. It is not a bug fix, it is actually a feature. Do you have an objection to me returning this patch (with this explanation in the commit message) to this patchsets V3?
Sorry for the confusion
Thanks!
Arthur
Jakub Kicinski July 14, 2020, 3:59 p.m. UTC | #6
On Tue, 14 Jul 2020 11:20:27 +0000 Kiyanovski, Arthur wrote:
> > This commit actually enables a feature after it was fixed by previous commits,
> > therefore we thought that net-next could be a right place. But if you think it
> > should go to net, we'll go ahead and resubmit it there. Thanks for your
> > comments.  
> 
> Jakub, 
> I’ve removed the patch from v2 but it seems to me there was some
> miscommunication and IMO the correct place for the patch should be
> net-next. This feature was actually turned off until now, and this
> patch turns it on. It is not a bug fix, it is actually a feature. Do
> you have an objection to me returning this patch (with this
> explanation in the commit message) to this patchsets V3?

Sounds good, the commit message makes all the difference.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h b/drivers/net/ethernet/amazon/ena/ena_admin_defs.h
index afe87ff09b20..7f7978b135a9 100644
--- a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h
+++ b/drivers/net/ethernet/amazon/ena/ena_admin_defs.h
@@ -817,7 +817,8 @@  struct ena_admin_host_info {
 	 * 1 : rx_offset
 	 * 2 : interrupt_moderation
 	 * 3 : rx_buf_mirroring
-	 * 31:4 : reserved
+	 * 4 : rss_configurable_function_key
+	 * 31:5 : reserved
 	 */
 	u32 driver_supported_features;
 };
@@ -1132,6 +1133,8 @@  struct ena_admin_ena_mmio_req_read_less_resp {
 #define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK       BIT(2)
 #define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_SHIFT          3
 #define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK           BIT(3)
+#define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_SHIFT 4
+#define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK BIT(4)
 
 /* aenq_common_desc */
 #define ENA_ADMIN_AENQ_COMMON_DESC_PHASE_MASK               BIT(0)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index fd5f0d87cc59..b3dd9abfedd1 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -3126,7 +3126,8 @@  static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pd
 	host_info->driver_supported_features =
 		ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK |
 		ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK |
-		ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK;
+		ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK |
+		ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK;
 
 	rc = ena_com_set_host_attributes(ena_dev);
 	if (rc) {