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 F4070A00BE; Wed, 20 Apr 2022 09:47:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C4A24068E; Wed, 20 Apr 2022 09:47:01 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id E9B7040687 for ; Wed, 20 Apr 2022 09:46:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650440820; x=1681976820; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=0gfJVR5QUslu3KSKpMBlxyjFtumsu6Gz7I9Nb475NP4=; b=KocxPW5sb5ntW1UI6HCNiK0qJp+t4QusXxbL6P4PtFLXBJlYz3BatMjk 0xUZ3tSCsGaZBQlK0bzV1tIhwfF1vRl23SpwukAFUNBkAY6gPqKAPX+Dv Yg8YF3Qu7T6fcEOjzoXxeM4UhE1DoxbhKrfFp9KtzK6eeQ4v6vR69p0Ye hMDOQHM1eqJcnpyeJ5oIMbXa80IIZ85VT9vK/6eKMQBrC/Kv2wi3YpY8E Fs5M2hNawEbk4kt6JKlHftfL1YhG8KJ3JWDrj84Oz1SNb5Bw8kiLrRVAA PEzvq3aiFaw4OASqs3Tbirj7pyqeMO7taHxgyrjPoI3Vuxb8qk1REKBB2 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="251273238" X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="251273238" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 00:46:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,275,1643702400"; d="scan'208";a="702545460" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 20 Apr 2022 00:46:51 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 20 Apr 2022 00:46:51 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 20 Apr 2022 00:46:50 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 20 Apr 2022 00:46:50 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.102) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 20 Apr 2022 00:46:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kb6zC0m5mVstUEdK8WN0C6HS2wlgNdxYSvng6QjjemRCzkzzJXVViGcBZkeXx4yGHGOpxNWc6Bf+Pa5buKUZok4vL6XMj7qn3S6YU4RqtE6QeNI4hGT74wAD74HT3dHc5frSyh7lB/KIe2F7BBC1rxQF9OOmplPqVpaBUIqcAvJz6jHfcmvR6RDwvNFktfAcYRsR7oETPXGIAzZB+K9QkYBA7HhXg6nxx8JXyRPoynxCpcKQj/0zblmsx1h2Lj4GxJnn4AMGCOgz8396XT7C2k9dq4CQSDEuNBZx1VFO9LVmeMQQDZCbWmqv/i2/EhLfklGD8L/Py7WDPi8M4lUqOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S9Zbz2wwsbZZpRRpVnrP4v2sPGLu0RJQPhchrDe03Xc=; b=NHPgvGoIS4dtZjktAwNvAT+d0GsghVVZOIBLOBGpFkvUa9cu2kEDfniYoEOfoFOnSZtJ4a20JIW4UdiYfZCVJnj/3zHa+LcXP+d0AVOCNHOFvX6f82VMjif3oNxGqbHxx5mFCQ2w+ya6+Ny2qI9d7UBYZYGzpQuM5mbsPCX82cII+FYjcjiCax8AeCx08wb4E0MmFjZot8vxioRQUTDFTCdYTo7mbr0M3OU6UrSZ7RPpRvjOYvT0w/N4MHMpiQ2iGjYY5LCjVyFsRkAZn/YEfyTRD4z/qidtexMthJWaQJfOqOzE84bpsmLLSXCjYbuAtikpVuiwYWTzV9K6KeTrOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3495.namprd11.prod.outlook.com (2603:10b6:a03:8a::14) by PH7PR11MB5941.namprd11.prod.outlook.com (2603:10b6:510:13d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18; Wed, 20 Apr 2022 07:45:05 +0000 Received: from BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::784a:cab8:f035:d8ca]) by BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::784a:cab8:f035:d8ca%6]) with mapi id 15.20.5164.025; Wed, 20 Apr 2022 07:45:05 +0000 From: "Wang, Haiyue" To: Gagandeep Singh , "dev@dpdk.org" Subject: RE: [PATCH] kni: update kernel API to receive packets Thread-Topic: [PATCH] kni: update kernel API to receive packets Thread-Index: AQHYT/qJtIoKvj8+pk2NeezSq0PHZqz4R+WAgAAsHUA= Date: Wed, 20 Apr 2022 07:45:05 +0000 Message-ID: References: <20220414122319.3519271-1-g.singh@nxp.com> <20220420050309.1055593-1-g.singh@nxp.com> In-Reply-To: <20220420050309.1055593-1-g.singh@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7bf8c2a7-e241-4333-09fd-08da22a1af77 x-ms-traffictypediagnostic: PH7PR11MB5941:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BA5XnaIrRhtCyOlIFKdJra4A2e5pn06YaOAquFgpSD9bl0F7ToL+EruETAPf5HWqJla5k7Tyj7pKUc23pGRlw0ASu97V0NtTHe5OsTO8up0d6JtRlevqo0AYhKeRvcevh3gZejgDLF8aqhM7GUmdRJc8C6mgMYzYNrhVh7z43w7pxiYdOjRhk2lokUpqZpkJ6GZSbR7+QFS8af9utfQ0hpJPzSDm2WsZeuObRv0objNp+cXatQaE/ijqx1aTnyQ/IbH0HsOlZFuQqQ5AF41noLw8910BDKsLG70T7eOULYZUjvnP5Q0+pNUwDg9Ay5D0gZAX9efd9G4K/DaslF/5ALjzr8J1sCxFdWiCwfTvaf9uIqHdjbN+IHtbRjfKjT+iPw3f/PtjqS5e/iJIysm552JjIRxV01w1YS2N98jczB2CtFV9q7nnWwSiYx+slqB4EujeSESDTEN5kV7V3pw8H+Y41PLbHuG1h5It1sDfXTU/v0Vamle182vvQtwID9TuKiHNB+/a8yO9k5LwoynS5kuETGW+6UczH57ZazkGou9weTNA5UYL9mDXczidj4BTpjdrgKaN5sCJvL3o53SZCLBUvJHNSHFoR70LLk9JM6tlSbXx05xaGh47DjT5eH7MSl9FcRuPksKmoIK7PPM8cg90T05i01Z5wfV8/VqmJkAmMjzam6S3B9R1M/YJdiUzjN1qPplmSfd8IDhl7Ng8NpGxXMbvIp0sKSDaoXmDsq6gMuvOWWnqsx6kUIre5uXTi5XbMW6qYIhc8NOFkbMyvqsjVFjdlshLjkA7GDqTuL08TzCFG6gsLLy6gt0rAKOvnYAn/S4tyP2PfWyhpMWZ/g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3495.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(966005)(316002)(83380400001)(71200400001)(66946007)(76116006)(86362001)(186003)(26005)(38070700005)(82960400001)(38100700002)(55016003)(8936002)(52536014)(110136005)(508600001)(66476007)(8676002)(64756008)(5660300002)(66446008)(33656002)(15650500001)(6506007)(9686003)(66556008)(2906002)(7696005)(122000001)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?M5cbThMR0sMPd7kBgzE6GM+82jzCdP0lm3CWzWaaKFsWv8lHhqFjwQ+PYr23?= =?us-ascii?Q?0xJM/7VYmWFyjL3vhqrp91ixV65sruazDMqcKEs6cKXLRZdHwjqLNm9a3mxE?= =?us-ascii?Q?nOlc9VfW0GVE24CYaWhcwDYKchQpd9flkBwypF3aDyivtuLH9d+k3eBIYr0+?= =?us-ascii?Q?jCPEkFXvxUskbaNH25yp8p9e1ecztHULZxYYU22D8LqOQ4ijBhmH6gieT5xY?= =?us-ascii?Q?0w/6j1K32A+kJKijtHYeJm4rxEu9FpnGnaqtm+CYv+QuKpPEZLdjbH5W1llb?= =?us-ascii?Q?buWAGx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5aBvabZV90RK0rwl?= =?us-ascii?Q?msi+N23pKu7PuL2CrE0giUVT6AEx095xS9S9OszSP480gCOA+ZzE/zE/8Fsj?= =?us-ascii?Q?2KylUsGShl38PINY/sKNac60ZToRp23wnZFAInP3+3tONocYTrN+34kG2SSx?= =?us-ascii?Q?j8rjJYWoLrXoPINejmvRwEahESMKa8G6svJrZJogCte8BaibSo41FDRm5fsu?= =?us-ascii?Q?nAvcgPYXyDl6IdaVO8wFh8yeZH9zjWrxgk6pwBCfQKer9iGKRcEC6UgBK95H?= =?us-ascii?Q?4ewD+01AO16+dDCxQGs2wBpZhu+osqmYa8vCtVoPsv0MAmU1AeeSeFX1nWIW?= =?us-ascii?Q?wJfQFxlRAroavPmgefHLGxubVhS0WTEt0JNuLTAfucz8Kj+BRLZu89hUhoua?= =?us-ascii?Q?ZixNj0ORKvY5TYaL8s9WAKPevEXCBpp1pek6Rwhz9FFyHJzsb5NRyw/CgIn9?= =?us-ascii?Q?Gzvof3QX4bCOm8YdDssSUMHqFfNp9a1DxP4Wm/1MCK/zeBxMOG2v68yoT82z?= =?us-ascii?Q?7DnVxIsTfBqdQsf48w3V+3YI8ksbOoavy2z1wYvYKir0kJQYuVaqK7T4jxxW?= =?us-ascii?Q?K3ragwH7GA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3495.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7bf8c2a7-e241-4333-09fd-08da22a1af77 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2022 07:45:05.4458 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1N4HPsQr3MQVke+TA6cLNkVVsxOFC0hGhi4wZVPo+k7NR1U5GtWwXIS7/cz3shk8E6WZR134C+HbPxYen/ibCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5941 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Gagandeep Singh > Sent: Wednesday, April 20, 2022 13:03 > To: dev@dpdk.org > Cc: Gagandeep Singh > Subject: [PATCH] kni: update kernel API to receive packets >=20 > API 'netif_rx_ni()' has been removed in kernel with commit: > baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any con= text.") >=20 It should be 5.18: git describe --contains baebdf48c3600 v5.18-rc1~136^2~356^2~1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net= /core/dev.c?h=3Dv5.18-rc1#n4917 vs https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/net/c= ore/dev.c?h=3Dv5.17.3#n4836 > The API netif_rx() can be used for any context to receive packets > from device drivers. >=20 > This patch replaces the API netif_rx_ni() with netif_rx() for > kernel version 5.17 and above. >=20 > Signed-off-by: Gagandeep Singh > --- > kernel/linux/kni/kni_net.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c > index 29e5b9e21f..764ac0b225 100644 > --- a/kernel/linux/kni/kni_net.c > +++ b/kernel/linux/kni/kni_net.c > @@ -441,7 +441,11 @@ kni_net_rx_normal(struct kni_dev *kni) > skb->ip_summed =3D CHECKSUM_UNNECESSARY; >=20 > /* Call netif interface */ > +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(5, 17, 0) > + netif_rx(skb); > +#else > netif_rx_ni(skb); > +#endif >=20 > /* Update statistics */ > dev->stats.rx_bytes +=3D len; > -- > 2.25.1