Skip to content

Commit 0ee60ed

Browse files
akiyanodavem330
authored andcommitted
net: ena: enable support of rss hash key and function changes
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. This commit turns on device support for hash key and RSS function management. Without this commit this feature is turned off at the device and appears to the user as unsupported. This commit concludes the following series of already merged commits: commit 0af3c4e ("net: ena: changes to RSS hash key allocation") commit c1bd17e ("net: ena: change default RSS hash function to Toeplitz") commit f66c2ea ("net: ena: allow setting the hash function without changing the key") commit e9a1de3 ("net: ena: fix error returning in ena_com_get_hash_function()") commit 80f8443 ("net: ena: avoid unnecessary admin command when RSS function set fails") commit 6a4f7dc ("net: ena: rss: do not allocate key when not supported") commit 0d1c3de ("net: ena: fix incorrect default RSS key") The above commits represent the last part of the implementation of this feature, and with them merged the feature can be enabled in the device. Signed-off-by: Arthur Kiyanovski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0f505c6 commit 0ee60ed

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/net/ethernet/amazon/ena/ena_admin_defs.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,8 @@ struct ena_admin_host_info {
817817
* 1 : rx_offset
818818
* 2 : interrupt_moderation
819819
* 3 : rx_buf_mirroring
820-
* 31:4 : reserved
820+
* 4 : rss_configurable_function_key
821+
* 31:5 : reserved
821822
*/
822823
u32 driver_supported_features;
823824
};
@@ -1132,6 +1133,8 @@ struct ena_admin_ena_mmio_req_read_less_resp {
11321133
#define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK BIT(2)
11331134
#define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_SHIFT 3
11341135
#define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK BIT(3)
1136+
#define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_SHIFT 4
1137+
#define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK BIT(4)
11351138

11361139
/* aenq_common_desc */
11371140
#define ENA_ADMIN_AENQ_COMMON_DESC_PHASE_MASK BIT(0)

drivers/net/ethernet/amazon/ena/ena_netdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3126,7 +3126,8 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev, struct pci_dev *pd
31263126
host_info->driver_supported_features =
31273127
ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK |
31283128
ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK |
3129-
ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK;
3129+
ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK |
3130+
ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK;
31303131

31313132
rc = ena_com_set_host_attributes(ena_dev);
31323133
if (rc) {

0 commit comments

Comments
 (0)