Skip to content

Commit 6e2de20

Browse files
Netanel Belgazaldavem330
authored andcommitted
net/ena: fix ethtool RSS flow configuration
ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type treat the ena_flow_hash_to_flow_type enum as power of two values. Change the values of ena_admin_flow_hash_fields to be power of two values. This bug effect the ethtool set/get rxnfc. ethtool will report wrong values hash fields for get and will configure wrong hash fields in set. Signed-off-by: Netanel Belgazal <netanel@annapurnalabs.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6a1ce2f commit 6e2de20

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -631,22 +631,22 @@ enum ena_admin_flow_hash_proto {
631631
/* RSS flow hash fields */
632632
enum ena_admin_flow_hash_fields {
633633
/* Ethernet Dest Addr */
634-
ENA_ADMIN_RSS_L2_DA = 0,
634+
ENA_ADMIN_RSS_L2_DA = BIT(0),
635635

636636
/* Ethernet Src Addr */
637-
ENA_ADMIN_RSS_L2_SA = 1,
637+
ENA_ADMIN_RSS_L2_SA = BIT(1),
638638

639639
/* ipv4/6 Dest Addr */
640-
ENA_ADMIN_RSS_L3_DA = 2,
640+
ENA_ADMIN_RSS_L3_DA = BIT(2),
641641

642642
/* ipv4/6 Src Addr */
643-
ENA_ADMIN_RSS_L3_SA = 5,
643+
ENA_ADMIN_RSS_L3_SA = BIT(3),
644644

645645
/* tcp/udp Dest Port */
646-
ENA_ADMIN_RSS_L4_DP = 6,
646+
ENA_ADMIN_RSS_L4_DP = BIT(4),
647647

648648
/* tcp/udp Src Port */
649-
ENA_ADMIN_RSS_L4_SP = 7,
649+
ENA_ADMIN_RSS_L4_SP = BIT(5),
650650
};
651651

652652
struct ena_admin_proto_input {

0 commit comments

Comments
 (0)