DPDK patches and discussions
 help / color / mirror / Atom feed
From: Patrick Robb <probb@iol.unh.edu>
To: Paul Szczepanek <paul.szczepanek@arm.com>
Cc: Nicholas Pratte <npratte@iol.unh.edu>,
	yoan.picchi@foss.arm.com, dmarx@iol.unh.edu,
	 Honnappa.Nagarahalli@arm.com, luca.vizzarro@arm.com, nd@arm.com,
	dev@dpdk.org
Subject: Re: [PATCH v1] dts: add time delay to async sniffer callback function
Date: Wed, 13 Nov 2024 02:27:52 -0500	[thread overview]
Message-ID: <CAJvnSUAs+6fX8ccuEZC0=pN_pnMa4hum3xXFSK+wDzaK1pYZ6w@mail.gmail.com> (raw)
In-Reply-To: <e45ce48c-12e5-4f78-9df6-2b1fcd084cf7@arm.com>

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]

On Wed, Nov 6, 2024 at 3:17 PM Paul Szczepanek <paul.szczepanek@arm.com>
wrote:

>
> On 30/10/2024 17:08, Nicholas Pratte wrote:
> > There exists a bug within i40e NICs in which the async sniffer does not
> > catch send packets as a result of the callback function sending packets
> > too quickly before the NICs are ready to start capturing.
> >
> > There could be a multitude of reasons why this happens on these NICs, but
> > for the time being, inserting a one second delay in the callback function
> > will suffice.
>
> I can confirm the issue exists but we should explore a more definitive
> solution than adding a wait. Ideally instead of relying on the callback
> to send packets we should verify readines elsewhere in our sniffer and
> send packets when ready in our framework and not as part of the scapy
> sniffer constructor.
>

From looking at the documentation, it is the case that the standard way of
verifying readiness for the asyncsniffer is via the started_callback arg in
the asyncsniffer constructor. You can see some similar discussion here:
https://github.com/secdev/scapy/issues/3208

 So, if this is standard, it is probably best to remain within this
framework. I have been messing with this series tonight and although I
still can't tell why started_callback isn't calling on true sniffer
readiness, I think Nick's time.sleep calls are okay.

I will say, the modification of duration in this series is odd to me. It
looks like the _shell_start_and_stop_sniffing function arg has no default,
and no value is passed in in the call coming from send_packets_and_capture.
My preference would be to provide a default to the duration arg (say, 1)
and remove the arbitrary "duration + 1" in this series.

I also believe the comments about i40e should be removed. We understand
that this series is adding a delay to support sniffer readiness, but we
don't know why this behavior was originally seen on an i40e NIC, and
whether it's isolated to that driver.

Perhaps there would be a way to loop polling of scapy for sniffer
readiness, but I don't see how this would be better or different than the
asyncsniffer callback arg (which is essentially the same according to
docs). So, in my view the best thing to do is for me to fix up the commit
per my comments (and any others anyone has) and apply this.

[-- Attachment #2: Type: text/html, Size: 2945 bytes --]

  reply	other threads:[~2024-11-13  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 17:08 Nicholas Pratte
2024-11-06 20:17 ` Paul Szczepanek
2024-11-13  7:27   ` Patrick Robb [this message]
2024-11-13 18:56 ` [PATCH v2] " Nicholas Pratte
2024-11-14  6:01 ` [PATCH v1] " Patrick Robb

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='CAJvnSUAs+6fX8ccuEZC0=pN_pnMa4hum3xXFSK+wDzaK1pYZ6w@mail.gmail.com' \
    --to=probb@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=luca.vizzarro@arm.com \
    --cc=nd@arm.com \
    --cc=npratte@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=yoan.picchi@foss.arm.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).