netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ferenc Fejes <ferenc.fejes@ericsson.com>
To: "jesse.brandeburg@intel.com" <jesse.brandeburg@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"sasha.neftin@intel.com" <sasha.neftin@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"anthony.l.nguyen@intel.com" <anthony.l.nguyen@intel.com>
Cc: "hawk@kernel.org" <hawk@kernel.org>
Subject: BUG(?): igc link up and XDP program init fails
Date: Thu, 24 Aug 2023 13:43:02 +0000	[thread overview]
Message-ID: <0caf33cf6adb3a5bf137eeaa20e89b167c9986d5.camel@ericsson.com> (raw)

Dear igc Maintainers!

I noticed that ip link set dev up fails with igc (Intel i225) driver
when XDP program is attached to it. More precisely, only when we have
incoming traffic and the incoming packet rate is too fast (like 100
packets per-sec).

I don't have a very smart reproducer, so 4 i225 cards are needed to
trigger it. My setup (enp3s0 and enp4s0 directly connected with a
cable, similarly enp6s0 and enp7s0).

veth0 ----> veth1 --redir---> enp3s0 ~~~~~~~ enp4s0
			  |
                          +-> enp6s0 ~~~~~~~ enp7s0

ip link add dev type veth
ip nei change 1.2.3.4 lladdr aa:aa:aa:aa:aa:aa dev veth0
xdp-bench redirect-multi veth1 enp3s0 enp6s0	#in terminal 1
xdpdump -i enp4s0				#in terminal 2
ping -I veth0 1.2.3.4 -i 0.5 #slow packet rate  #in terminal 3

Now in a separate terminal do a "ip link set dev enp4s0 down" and "ip
link set dev enp4s0 up". After a while, xdpdump will see the incoming
packets.

Now in terminal 3, change the ping to a faster rate:
ping -I veth0 1.2.3.4 -i 0.01

And do the ip link down/up again. In my setup, I no longer see incoming
packets. With bpftrace I see the driver keep trying to initialize
itself in an endless loop.

Now stop the ping, wait about 4-5 seconds, and start the ping again.
This is enough time for the driver to initialize properly, and packets
are visible in xdpdump again.

If anyone has an idea what is wrong with my setup I would be happy to
hear it, and I can help with testing fixes if this is indeed a bug.
I have replicated the setup with veths and it looks fine.

Thanks in advance!

Best,
Ferenc


             reply	other threads:[~2023-08-24 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 13:43 Ferenc Fejes [this message]
2023-08-25 22:56 ` BUG(?): igc link up and XDP program init fails Vinicius Costa Gomes
2023-08-25 23:51   ` Vinicius Costa Gomes
2023-09-04 12:29   ` Ferenc Fejes

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=0caf33cf6adb3a5bf137eeaa20e89b167c9986d5.camel@ericsson.com \
    --to=ferenc.fejes@ericsson.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=hawk@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sasha.neftin@intel.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).