From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11E61A0C4D; Mon, 4 Oct 2021 15:10:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BE764136F; Mon, 4 Oct 2021 15:10:02 +0200 (CEST) Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) by mails.dpdk.org (Postfix) with ESMTP id ECF9641340 for ; Mon, 4 Oct 2021 15:10:01 +0200 (CEST) Received: by mail-il1-f175.google.com with SMTP id l20so5821526ilk.2 for ; Mon, 04 Oct 2021 06:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2RCU9hzI3tjB7bPPq1mPWH4l0a7vr8a3rbzG4Napjmk=; b=hh4LPRMYKukHBelTj/06e5GptxbgNC443emQDN0xNt/qzIMHP1VC7yLeMVXtXMpZeM 2hTAdCzyMqbSDc/C2NJgo1nEiotH4me+aYCGVkNin3VhyhnKlNtsqCyDh+8oMCqNDFzM 4GkxLJHcD+r1A9Ok3QoWl+RlcEpUok44RcHfcXg6R1gOtcbt3zzs0WowFNz8gg32Fhtr bqpDXE0jwFF3s4CgC/L6zppy4nxucHMiM4ozVkbHf0UfFF3aeBwY0aMqDkvkg9gAc6Sa xLPxjG/Fy6rn+IfofX7+mLnX/57CSLoG0+ob6DOeGLL8qIuU3RiJCeuRfIYL8gmKG1+0 lGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2RCU9hzI3tjB7bPPq1mPWH4l0a7vr8a3rbzG4Napjmk=; b=EZa6bB9w9JQFKx1/M9/EcmfJ08BVR0DU3oiuP0JAVeOPBai+Mc+UBcIkbEckXZI1PF MDcT56NqLZDXr2Thgn1mVXDLsO267CGkZhgfsbxOH347n4L/AYQjcdU7ZcB2GsHKVZNU q+Ptn4tcXGnNgqQ++lgvWXWyWicWzjtg8Gse3V4wLGxqfC+VsiPx10F+AyifmH2A2mKL pb8pJ50UE3k32KLv2MN5clqeE71Hps/1zeodOzxcaZyAJGX8TB/TtZhhZlWS7XenURad UzT0vQaoHURHNDDoOuBzafNlgv/NqigOkQaIiJpF88T/r1igc4LS5Q935RXuicB7vyh7 cT/g== X-Gm-Message-State: AOAM532AYEOV9NAlyN0jgJalxRMJU42WpMLvMqE+CowgGzghkTzfgfdR Jfayo9AuPfP72x3nJbhWzVauQDqCz0w+y3AKExo= X-Google-Smtp-Source: ABdhPJzdtYmKcj4Kf4b6hb1bRDRT9XZUQHVVk3/4x2MmqymcT7yFICxbLIAi/NhSwBj/JkdQ+NDacDfMC8svhpNWQRQ= X-Received: by 2002:a05:6e02:bf1:: with SMTP id d17mr5536476ilu.81.1633353001230; Mon, 04 Oct 2021 06:10:01 -0700 (PDT) MIME-Version: 1.0 References: <20210924105409.21711-1-eladv6@gmail.com> In-Reply-To: From: Elad Nachman Date: Mon, 4 Oct 2021 16:09:49 +0300 Message-ID: To: Ferruh Yigit Cc: Eric Christian , dev , Igor Ryzhov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v2] kni: Fix request overwritten X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, EAGAIN is propogated back to the kernel and to the caller. We cannot retry from the kni kernel module since we hold the rtnl lock. FYI, Elad =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=91=D7=B3, 4 =D7= =91=D7=90=D7=95=D7=A7=D7=B3 2021, 16:05, =D7=9E=D7=90=D7=AA Ferruh Yigit = =E2=80=8F< ferruh.yigit@intel.com>: > 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 > > --- > > 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 =3D (struct rte_kni_request *)kni->sync_kva; > > + if (cur_req->req_in_progress) { > > + ret =3D -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 '-EAGAI= N' > 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? > >