DPDK patches and discussions
 help / color / mirror / Atom feed
From: Eric Christian <erclists@gmail.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Elad Nachman <eladv6@gmail.com>,
	dev@dpdk.org, Igor Ryzhov <iryzhov@nfware.com>,
	sahithi.singam@oracle.com
Subject: Re: [dpdk-dev] [PATCH v2] kni: Fix request overwritten
Date: Mon, 4 Oct 2021 10:14:00 -0400	[thread overview]
Message-ID: <CAFbSC56WGGF7HH=gNJYB9rt9NVu4R3qmT2TvFhwYv6CVXxfF4A@mail.gmail.com> (raw)
In-Reply-To: <f52600ed-3d80-457d-b096-8814850990f3@intel.com>

Adding Sahithi.

I believe adding the -EAGAIN method puts the responsibility on the
application/caller.  If we take the change MAC address as an example.  Most
application code just does this kind of check:

        ret = ioctl(sockfd, SIOCSIFHWADDR, &ifr);

        if (ret < 0) {
                PMD_LOG_ERRNO(ERR, "ioctl(SIOCSIFHWADDR) failed");
                return -EINVAL;
        }

So the existing application code will treat the -EAGAIN as a failure and
not retry.  Unless it is expected that the IOCTL can return -EAGAIN and the
application decides to keep retrying?

We can try this, but we have temporarily patched out the async changes in
our code as it was blocking QA due to
https://bugs.dpdk.org/show_bug.cgi?id=816

Eric










On Mon, Oct 4, 2021 at 9:05 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 9/24/2021 11:54 AM, Elad Nachman wrote:
> > Fix lack of multiple KNI requests handling support by introducing a
> > request in progress flag which will fail additional requests with
> > EAGAIN return code if the original request has not been processed
> > by user-space.
> >
> > Bugzilla ID: 809
>
> Hi Eric,
>
> Can you please test this patch, if it solves the issue you reported?
>
> >
> > Signed-off-by: Elad Nachman <eladv6@gmail.com>
> > ---
> >  kernel/linux/kni/kni_net.c | 9 +++++++++
> >  lib/kni/rte_kni.c          | 2 ++
> >  lib/kni/rte_kni_common.h   | 1 +
> >  3 files changed, 12 insertions(+)
> >
>
> <...>
>
> > @@ -123,7 +124,15 @@ kni_net_process_request(struct net_device *dev,
> struct rte_kni_request *req)
> >
> >       mutex_lock(&kni->sync_lock);
> >
> > +     /* Check that existing request has been processed: */
> > +     cur_req = (struct rte_kni_request *)kni->sync_kva;
> > +     if (cur_req->req_in_progress) {
> > +             ret = -EAGAIN;
>
> Overall logic in the KNI looks good to me, this helps to serialize the
> requests
> even for async ones.
>
> But can you please clarify how it behaves in the kernel side with '-EAGAIN'
> return type? Will linux call the ndo again, or will it just fail.
>
> If it just fails should we handle the re-try on '-EAGAIN' within the kni
> module?
>
>

  parent reply	other threads:[~2021-10-04 14:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 10:54 Elad Nachman
2021-10-04 13:01 ` Ferruh Yigit
2021-10-04 13:09   ` Elad Nachman
2021-10-04 14:03     ` Ferruh Yigit
2021-10-04 14:25       ` Elad Nachman
2021-10-04 14:51         ` Ferruh Yigit
2021-10-04 14:58           ` Elad Nachman
2021-10-04 15:48             ` Ferruh Yigit
2021-10-04 16:18               ` Elad Nachman
2021-10-04 16:59                 ` Eric Christian
2021-10-04 18:27                   ` Elad Nachman
2021-10-08 20:23                     ` Ferruh Yigit
2021-10-08 21:11                 ` Ferruh Yigit
2021-10-04 14:14   ` Eric Christian [this message]
2021-10-04 14:56     ` Ferruh Yigit

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='CAFbSC56WGGF7HH=gNJYB9rt9NVu4R3qmT2TvFhwYv6CVXxfF4A@mail.gmail.com' \
    --to=erclists@gmail.com \
    --cc=dev@dpdk.org \
    --cc=eladv6@gmail.com \
    --cc=ferruh.yigit@intel.com \
    --cc=iryzhov@nfware.com \
    --cc=sahithi.singam@oracle.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).