netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, saeedm@mellanox.com,
	michael.chan@broadcom.com, emil.s.tantilov@intel.com,
	alexander.h.duyck@linux.intel.com, jeffrey.t.kirsher@intel.com,
	tariqt@mellanox.com, mkubecek@suse.cz,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next v4 07/10] ixgbe: don't clear UDP tunnel ports when RXCSUM is disabled
Date: Thu,  9 Jul 2020 17:42:50 -0700	[thread overview]
Message-ID: <20200710004253.211130-8-kuba@kernel.org> (raw)
In-Reply-To: <20200710004253.211130-1-kuba@kernel.org>

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>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20 -------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index f5d3d6230786..acdf525272a3 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -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)
-- 
2.26.2


  parent reply	other threads:[~2020-07-10  0:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10  0:42 [PATCH net-next v4 00/10] udp_tunnel: add NIC RX port offload infrastructure Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 01/10] debugfs: make sure we can remove u32_array files cleanly Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 02/10] udp_tunnel: re-number the offload tunnel types Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 03/10] udp_tunnel: add central NIC RX port offload infrastructure Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 04/10] ethtool: add tunnel info interface Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 05/10] netdevsim: add UDP tunnel port offload support Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 06/10] selftests: net: add a test for UDP tunnel info infra Jakub Kicinski
2020-07-10  0:42 ` Jakub Kicinski [this message]
2020-07-10  0:42 ` [PATCH net-next v4 08/10] ixgbe: convert to new udp_tunnel_nic infra Jakub Kicinski
2020-07-10  0:42 ` [PATCH net-next v4 09/10] bnxt: " Jakub Kicinski
2020-07-10  1:50   ` Michael Chan
2020-07-10  0:42 ` [PATCH net-next v4 10/10] mlx4: " Jakub Kicinski
2020-07-10 20:54 ` [PATCH net-next v4 00/10] udp_tunnel: add NIC RX port offload infrastructure David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200710004253.211130-8-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=emil.s.tantilov@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=michael.chan@broadcom.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).