Skip to content

Commit

Permalink
ixgbe: don't clear UDP tunnel ports when RXCSUM is disabled
Browse files Browse the repository at this point in the history
It appears the clearing of UDP tunnel ports when RXCSUM
is disabled is unnecessary. Driver will not pay attention
to checksum bits if RXCSUM is not set, so we can let
the hardware parse the packets.

Note that the UDP tunnel port NDO handlers don't pay attention
to the state of RXCSUM, so the ports could had been re-programmed,
anyway.

This cleanup simplifies later conversion patch.

v2:
 - break this out of the following patch.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Jul 10, 2020
1 parent 91f430b commit abc0c78
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9784,26 +9784,6 @@ static int ixgbe_set_features(struct net_device *netdev,

netdev->features = features;

if ((adapter->flags & IXGBE_FLAG_VXLAN_OFFLOAD_CAPABLE)) {
if (features & NETIF_F_RXCSUM) {
adapter->flags2 |= IXGBE_FLAG2_UDP_TUN_REREG_NEEDED;
} else {
u32 port_mask = IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK;

ixgbe_clear_udp_tunnel_port(adapter, port_mask);
}
}

if ((adapter->flags & IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE)) {
if (features & NETIF_F_RXCSUM) {
adapter->flags2 |= IXGBE_FLAG2_UDP_TUN_REREG_NEEDED;
} else {
u32 port_mask = IXGBE_VXLANCTRL_GENEVE_UDPPORT_MASK;

ixgbe_clear_udp_tunnel_port(adapter, port_mask);
}
}

if ((changed & NETIF_F_HW_L2FW_DOFFLOAD) && adapter->num_rx_pools > 1)
ixgbe_reset_l2fw_offload(adapter);
else if (need_reset)
Expand Down

0 comments on commit abc0c78

Please sign in to comment.