igb/igbvf: set rx csum always enabled in hw, disable via sw
An issue was found in which rx checksum could not be enabled without resetting the interface. The issue was the hardware enable was not being done via ethtool. To resolve this issue and prevent conflicts with VF configuration we will leave the feature always enabled in hardware, and then in software we will choose to ignore the results via a sw flag. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0364d6fd2c
commit
7beb0146fc
@@ -275,13 +275,17 @@ static int igb_set_pauseparam(struct net_device *netdev,
|
||||
static u32 igb_get_rx_csum(struct net_device *netdev)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(netdev);
|
||||
return adapter->rx_csum;
|
||||
return !(adapter->flags & IGB_FLAG_RX_CSUM_DISABLED);
|
||||
}
|
||||
|
||||
static int igb_set_rx_csum(struct net_device *netdev, u32 data)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(netdev);
|
||||
adapter->rx_csum = data;
|
||||
|
||||
if (data)
|
||||
adapter->flags &= ~IGB_FLAG_RX_CSUM_DISABLED;
|
||||
else
|
||||
adapter->flags |= IGB_FLAG_RX_CSUM_DISABLED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user