netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	anthony.l.nguyen@intel.com, bjorn.topel@intel.com,
	magnus.karlsson@intel.com,
	Kiran Bhandare <kiranx.bhandare@intel.com>
Subject: [PATCH net-next 01/11] i40e: drop redundant check when setting xdp prog
Date: Fri, 12 Feb 2021 14:39:42 -0800	[thread overview]
Message-ID: <20210212223952.1172568-2-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210212223952.1172568-1-anthony.l.nguyen@intel.com>

From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Net core handles the case where netdev has no xdp prog attached and
current prog is NULL. Therefore, remove such check within
i40e_xdp_setup.

Reviewed-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 63e19d2e3301..8bb8eb65add9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -12947,9 +12947,6 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog,
 		return -EINVAL;
 	}
 
-	if (!i40e_enabled_xdp_vsi(vsi) && !prog)
-		return 0;
-
 	/* When turning XDP on->off/off->on we reset and rebuild the rings. */
 	need_reset = (i40e_enabled_xdp_vsi(vsi) != !!prog);
 
-- 
2.26.2


  reply	other threads:[~2021-02-12 22:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 22:39 [PATCH net-next 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2021-02-12 Tony Nguyen
2021-02-12 22:39 ` Tony Nguyen [this message]
2021-02-12 22:39 ` [PATCH net-next 02/11] i40e: drop misleading function comments Tony Nguyen
2021-02-13  1:21   ` Alexander Duyck
2021-02-12 22:39 ` [PATCH net-next 03/11] i40e: adjust i40e_is_non_eop Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 04/11] ice: simplify ice_run_xdp Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 05/11] ice: move skb pointer from rx_buf to rx_ring Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 06/11] ice: remove redundant checks in ice_change_mtu Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 07/11] ice: skip NULL check against XDP prog in ZC path Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 08/11] i40e: Simplify the do-while allocation loop Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 09/11] i40e: store the result of i40e_rx_offset() onto i40e_ring Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 10/11] ice: store the result of ice_rx_offset() onto ice_ring Tony Nguyen
2021-02-12 22:39 ` [PATCH net-next 11/11] ixgbe: store the result of ixgbe_rx_offset() onto ixgbe_ring Tony Nguyen
2021-02-13  1:45 ` [PATCH net-next 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2021-02-12 patchwork-bot+netdevbpf

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=20210212223952.1172568-2-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=bjorn.topel@intel.com \
    --cc=davem@davemloft.net \
    --cc=kiranx.bhandare@intel.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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).