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 1C1C1A050B; Fri, 15 Apr 2022 05:24:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B44BB40140; Fri, 15 Apr 2022 05:24:32 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id A4C2C4003C for ; Fri, 15 Apr 2022 05:24:31 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d15so6196843pll.10 for ; Thu, 14 Apr 2022 20:24:31 -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=v8tZ0i1M5/wnm2hTKKUqFJMe4Ryo+zAprG0zuuVSquk=; b=S7YEc19JMfogoD2UySU5RHiP06znU493UiUy8FXtbB12tX/qcK/hPomqrZsQnmEM2D GIrNAV+KRkWwxTEPbCre6SXUmE/zNiesuX2s2r1aljEY7o5wouKK8A1VYiJ8u47r7vto KVdyyC6ZDYJu2j7jd6YRzzO36qSiOlWgIC+bkEpFSeFMjToIXqG9JrwxUx2w7E04oO4z w+2znkR/KJTP8Cg4Te49ziYXyDOBuMjw0rpMM56Sm48UyVI1UvRgupVYMhHtzmT33Eu4 riAgpy2wh6hqe52FfuyycWXb8hM7N5q6xHeBs8QSl7BK5Jfj7DNcj4fcWZm+5mtPSPY+ lcHA== 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=v8tZ0i1M5/wnm2hTKKUqFJMe4Ryo+zAprG0zuuVSquk=; b=Len5mfE5Wfm/b8o1xHfEW162iic0bo8pNA9fX6c4IDolZmGS83UJWF9JA6NcCM9wFm I1p7iyQ2n53K5EotP/cHp0mxLW9Cl5IWk87rxq9wtQW9dGXOqKU24t/DFQm8OBhNMeQZ slldybQZCXXZIUWLL7QVeUHv7+iPjNNC8qtpWvfRX+DtmM4CAI/JtN8YkzNvHETdECH5 hAeeFtWGQmrV9vWaJNkEx5bZ/E7On/5zk8OuzL0bG2EZclW4yUOLutXBu4T681+ztyKB SboqRZuLiT1rE7vnfNrAwXmJfGvJlBU+pHlNBHBYgl1JKqjXmxlpG3oEVpWRRb5BHbTf 0sww== X-Gm-Message-State: AOAM5323Q2GAMkc7wE0O1IFBPNsKZs+xWNssc442ajNfFRYbyyPlc4j8 nmopseeTbGEEvu49ZkWjATFoaqthVBBqpcsqAiQ= X-Google-Smtp-Source: ABdhPJy6pdh+oN8p2T2aKfsr1vjZ5tSEfMcw9VYk/SWb81vs4cZPcY9xLXs2veq8f/+5eed11ybjvghOximTNVkQsEw= X-Received: by 2002:a17:90a:4e08:b0:1cb:a3ac:938b with SMTP id n8-20020a17090a4e0800b001cba3ac938bmr1903956pjh.112.1649993070779; Thu, 14 Apr 2022 20:24:30 -0700 (PDT) MIME-Version: 1.0 References: <20220414122319.3519271-1-g.singh@nxp.com> In-Reply-To: <20220414122319.3519271-1-g.singh@nxp.com> From: Harold Huang Date: Fri, 15 Apr 2022 11:24:19 +0800 Message-ID: Subject: Re: [PATCH] kni: update kernel API to receive packets To: Gagandeep Singh Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" 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 On Thu, Apr 14, 2022 at 8:23 PM Gagandeep Singh wrote: > > API 'netif_rx_ni()' has been removed in kernel with commit: > baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.") > > The API netif_rx() can be used for any context to receive packets > from device drivers. > > This patch replaces the API netif_rx_ni() with netif_rx(). But this change would cause KNI kernel module does not work in the old kernel without this patch. I suggested using netif_rx_ni to keep compatibility. > > Signed-off-by: Gagandeep Singh > --- > kernel/linux/kni/kni_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c > index 29e5b9e21f..e66b35314a 100644 > --- a/kernel/linux/kni/kni_net.c > +++ b/kernel/linux/kni/kni_net.c > @@ -441,7 +441,7 @@ kni_net_rx_normal(struct kni_dev *kni) > skb->ip_summed = CHECKSUM_UNNECESSARY; > > /* Call netif interface */ > - netif_rx_ni(skb); > + netif_rx(skb); > > /* Update statistics */ > dev->stats.rx_bytes += len; > -- > 2.25.1 > -- Thanks, Harold.