mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 03:26:23 +07:00
netvsc: report rss field values
Report current components used in RSS hash. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b448f4e892
commit
b5a5dc8dc8
@ -1008,6 +1008,30 @@ static void netvsc_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
netvsc_get_rss_hash_opts(struct netvsc_device *nvdev,
|
||||
struct ethtool_rxnfc *info)
|
||||
{
|
||||
info->data = RXH_IP_SRC | RXH_IP_DST;
|
||||
|
||||
switch (info->flow_type) {
|
||||
case TCP_V4_FLOW:
|
||||
case TCP_V6_FLOW:
|
||||
info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
|
||||
/* fallthrough */
|
||||
case UDP_V4_FLOW:
|
||||
case UDP_V6_FLOW:
|
||||
case IPV4_FLOW:
|
||||
case IPV6_FLOW:
|
||||
break;
|
||||
default:
|
||||
info->data = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
netvsc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
||||
u32 *rules)
|
||||
@ -1019,6 +1043,9 @@ netvsc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
||||
case ETHTOOL_GRXRINGS:
|
||||
info->data = nvdev->num_chn;
|
||||
return 0;
|
||||
|
||||
case ETHTOOL_GRXFH:
|
||||
return netvsc_get_rss_hash_opts(nvdev, info);
|
||||
}
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user