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: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	anthony.l.nguyen@intel.com, bjorn.topel@intel.com,
	maciej.fijalkowski@intel.com, magnus.karlsson@intel.com,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Subject: [PATCH net-next 5/6] i40e: Add info trace at loading XDP program
Date: Mon,  1 Feb 2021 18:24:19 -0800	[thread overview]
Message-ID: <20210202022420.1328397-6-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210202022420.1328397-1-anthony.l.nguyen@intel.com>

From: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>

New trace indicates that the XDP program was loaded.
The trace has a note that in case of using XDP_REDIRECT,
number of queues on both interfaces shall be the same.
This is required for optimal performance of XDP_REDIRECT,
if interface used for TX has lower number of queues than
a RX interface, the packets may be dropped (depending on
RSS queue assignment).

Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 521ea9df38d5..f35bd9164106 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -12489,11 +12489,14 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi,
 	/* Kick start the NAPI context if there is an AF_XDP socket open
 	 * on that queue id. This so that receiving will start.
 	 */
-	if (need_reset && prog)
+	if (need_reset && prog) {
+		dev_info(&pf->pdev->dev,
+			 "Loading XDP program, please note: XDP_REDIRECT action requires the same number of queues on both interfaces\n");
 		for (i = 0; i < vsi->num_queue_pairs; i++)
 			if (vsi->xdp_rings[i]->xsk_pool)
 				(void)i40e_xsk_wakeup(vsi->netdev, i,
 						      XDP_WAKEUP_RX);
+	}
 
 	return 0;
 }
-- 
2.26.2


  parent reply	other threads:[~2021-02-02  2:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  2:24 [PATCH net-next 0/6][pull request] 40GbE Intel Wired LAN Driver Updates 2021-02-01 Tony Nguyen
2021-02-02  2:24 ` [PATCH net-next 1/6] i40e: remove unnecessary memory writes of the next to clean pointer Tony Nguyen
2021-02-02  2:24 ` [PATCH net-next 2/6] i40e: remove unnecessary cleaned_count updates Tony Nguyen
2021-02-02  2:24 ` [PATCH net-next 3/6] i40e: remove the redundant buffer info updates Tony Nguyen
2021-02-02  2:24 ` [PATCH net-next 4/6] i40e: consolidate handling of XDP program actions Tony Nguyen
2021-02-02  2:24 ` Tony Nguyen [this message]
2021-02-03  2:33   ` [PATCH net-next 5/6] i40e: Add info trace at loading XDP program Jakub Kicinski
2021-02-03 10:00   ` Kubalewski, Arkadiusz
2021-02-03 18:32     ` Jakub Kicinski
2021-02-03 23:26       ` Kubalewski, Arkadiusz
2021-02-02  2:24 ` [PATCH net-next 6/6] i40e: Log error for oversized MTU on device Tony Nguyen
2021-02-03  2:34   ` Jakub Kicinski
2021-02-03  9:14     ` Loktionov, Aleksandr
2021-02-03 18:37       ` Jakub Kicinski

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=20210202022420.1328397-6-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=bjorn.topel@intel.com \
    --cc=davem@davemloft.net \
    --cc=george.kuruvinakunnel@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).