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 50989A0C4C; Tue, 21 Sep 2021 16:15:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37BE340DF8; Tue, 21 Sep 2021 16:15:30 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 23C7D4003C for ; Tue, 21 Sep 2021 16:15:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10113"; a="220174495" X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="220174495" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2021 06:57:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,311,1624345200"; d="scan'208";a="474079886" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga007.fm.intel.com with ESMTP; 21 Sep 2021 06:57:54 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 21 Sep 2021 06:57:53 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 21 Sep 2021 06:57:53 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) 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.2242.12; Tue, 21 Sep 2021 06:57:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cB/NEgbrrsN4BhZZ4raJeUmzBQmdghCiVW/i0xMwCrdHvzGcyymj8+i0g3gvxJZH3lJDaZ282Jbv1h7fnHY+DehDVWKXN5p8OvHnQuy2PDUNAQXhf5niIaxb7v1bG5KM48JfCpB36liOfOIfLVGjj5fYo6IXlsJMln5zUNskTl9Ct0Mh+1H8AxYA5xeWjS1oAdZhRb2NCKGeSlF29W6Tde/B1Ht4J3p/tZ+W2HJ/+hOBQkouaaQmQRG9bN+sTFrXc2aP10ni24A3HMVSMMpOtbHTMTEMZQE40d4Be1tdH3pG6aKz6DIJitP1SKbWw5+a4ZZ26mzV/GxjkmenYuEo1Q== 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; bh=JYLMc5Ng9XEGfBdejRp1V/IHPYsKk/e35o2QQMJwePc=; b=UrLhhjd5cmEFcBpkLms9MFmgFflBMxKJR8NsjndaqwxZ2fybED3dcAhpcYgnZrzSW0yZfiH6kRFDA+5wjjSDuK1uZh/y+ez5iGrvTSt7rHHxzZneXFq0ptA/iqI4jAy3plFSGX5RYJ4kZ0cS559NpwAXJUi9k5WhSePjJ8LIa3arrzDJqK0FDJunLywMfnXXHL2VFSLnlvOP6MgYcLsezHacVRiYHt9PSYvmkjS/awurbj32+2P5JpOY04Bc+PYjoGuuCMuEZ05kxdGw64Iz1IDUEnDiQG13z7i0kZYuWud+FMPbUh6BvszxRzTXwgg6fb6uAzF2M+V/s6Ga13ZkJg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JYLMc5Ng9XEGfBdejRp1V/IHPYsKk/e35o2QQMJwePc=; b=wsfmOqxI43IzAT6MdEUk36hQVsi8tT1dbbl4WP8pofhsdh/1w0lPlO7AkAwQZR4BUFuHdLdcCreS/T9vGXr/uOyR5eh+oLLJLDdy80G8Cr650vkklBRGjxDUEvUt9I9ZR7tX8GPlTpps+h8qwPg51Y93hGAz3761tLPf7PsV0wI= Authentication-Results: nfware.com; dkim=none (message not signed) header.d=none;nfware.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5141.namprd11.prod.outlook.com (2603:10b6:510:3c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Tue, 21 Sep 2021 13:57:52 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4523.018; Tue, 21 Sep 2021 13:57:52 +0000 To: Elad Nachman CC: , , References: <20210917123131.6329-1-eladv6@gmail.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <8b0ea7c1-9f2f-c081-ff01-6d327eaafc1c@intel.com> Date: Tue, 21 Sep 2021 14:57:46 +0100 In-Reply-To: <20210917123131.6329-1-eladv6@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2PR04CA0190.eurprd04.prod.outlook.com (2603:10a6:10:28d::15) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0190.eurprd04.prod.outlook.com (2603:10a6:10:28d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Tue, 21 Sep 2021 13:57:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6742145-9212-425d-5461-08d97d07ce14 X-MS-TrafficTypeDiagnostic: PH0PR11MB5141: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 91vghXdcWH1bNQ80fstzuJ4tb+3fURwGkr9Hdfy9TEPyaiHV62m/NHvWc6ba7z0/RaVN+SPjpwEgXb4vGOjvAsd4H5vhzbft8Ot+OfdjEJOHfYQNKgfwZDunJTP/XoNkcaMgCQP5MGh1Lle8gJcJcTPoNfgcDm29U27vB6/V6ZT/sjXe5Js1Qqhgxg6Gb4y9Qflmnq2OYFW1PMdZD+had0h8Sjbq2KVYJRTInoPvklS5vkKKDXQqY68OWcYpDy9NgILw+IPY+2o6d+51C4YY8oBCcNl5GDVeYdZEx6RIwKYqNw29lwzaoounjIHx7xTxEPaK4GmMPg27MiDiCWay6MLKl3WE7eTk4R3qC8iRdT3Q0z9o84NmsozF46DUqsHSeQ9QOzwAJqAReMDarBbmhTJhcvCN22HIM2uYKFX4zf3t1hjXCqCBymgat3b8cmY+v8SV7KSD4MkPuTuV1fZHyZXhJk5oVLw2AjOj72o7GKBYCIJV7j/kI9TmvlBeYShVjzMSnEnut+/iPuetL6+m8yjnUfhmBX2gJp8wshTMPwWuK6T20fi0yZswwuTuwSKIrWE++1bTXGScW9kyiCnjeXHZLKPZyyRyrFTjsDY7IBqQnHgYEaQslmCIOAqAweYkkOJTnB1aObMbE2vsNnklgsm6+8t9Tzeq1syjK4XsEe/wft254faFplo/4/7fNJ40/78cNc5N7Am5luQs4aMubA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(2906002)(36756003)(6916009)(5660300002)(8676002)(66556008)(16576012)(4326008)(2616005)(508600001)(66476007)(66946007)(6486002)(53546011)(8936002)(38100700002)(186003)(31686004)(26005)(86362001)(6666004)(316002)(956004)(31696002)(44832011)(83380400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SS9KME9wclRUTDR5QnJZUEJaVHEydnZJWm0wemhoTVl0RXdKeWliYkEvdWJ5?= =?utf-8?B?c2JXWVZ4NDlieHlOWit5a1E2T1lYN3lpTEkzRStRSzN1Q1pVTUZGcVFCNEdo?= =?utf-8?B?a2RiSGxEQkxocldwQ295SkN5WTA4QWFJcmN2aWt4dFdxc2VQUXBybVRwZkh4?= =?utf-8?B?M3pFZTllWGFzZjRwQmtYY2FhNTJOMTl2SzgrNjhvRUl3ZUZyR3gwUnVlZzFF?= =?utf-8?B?dzIzWXljQ01ybEV5Wk9KNTZJdlczNGdTekFHWndyMUdJZm1MUGxISmxJQ1lh?= =?utf-8?B?bnFMTU5NcUwrVWl3amI1eStrbkNLaHAwV0FGREVzTHh3T0dYcWt2TWo4NUZW?= =?utf-8?B?a3pCZllEa1lkRXYxRmVNd1pOc00wOWI2MDdiYkkxRXY5aVhEUUMrZ3JqRlBG?= =?utf-8?B?NlRQNHFmVlhMb20rZ2VpWlVXMktneEtibzBMdmNpNDh3bERUOHk3ekRvMmZh?= =?utf-8?B?ZEtpQ1EyV0lTNWF3WlduV3VJeENvNVl4ZWxoSll6c1NOMURKKzBYTGVNajNs?= =?utf-8?B?Rnp1QmZHSlovNWsydnF3bVdqcVJ0WU1pcnpUUEkxM3podmdOWWxTMzVHZDkw?= =?utf-8?B?TDNneHByVS9CZ3Mzd2NCZVFpOCtaT1B1MG80WjV6VkFLS0R6V1NUT2lwbW1U?= =?utf-8?B?MFd0YmdtcElZMWQ0VHFKSlVZMWRrSVZXRGtkcFlYalVFSERZZERMRW9pKzE3?= =?utf-8?B?TkI3NTJIL3VRb1B2MGpWWVQrVGt4UkRkUFgzV0lWajFEeDYwa1EzMzNLVm9K?= =?utf-8?B?NXd1L1lNd2tNaS92MDU3VFRldy8yY1V2T0xKR2hMaFljTE1CVTltay9jb0N1?= =?utf-8?B?SjNXcXBpcWk5ME53TnNmSDRGb1RDNktzZHZNTW5ZUzJ3cGw5NURkRnFNNFJy?= =?utf-8?B?ZTQ0ajgyWWJhRXZoNXdBYjhTWFBFbUYvV241bmJ4aStBcGJLZmJpemltR05x?= =?utf-8?B?TXI2QXBWRVZXd3VtNmt0K0JSTHFGNlBPTDhCMFF5djBEVjdZSTZNOEU0QUlN?= =?utf-8?B?aWdQOXdMcUZFSnROZGFxTnpOb0JWTzlYZnV6Y1JWSXhsREoyVGpDVlAxR01J?= =?utf-8?B?cnF2dm9RQmIxc0tNVEFzZjhxUkI0VFZpL3dac0ZjellmY3owcWFEcy8ra0xR?= =?utf-8?B?TVVHSWxKWmpBVyt3NzE1ZjhPSUZPRFNsbnBmQkUwTzFTK254eTFSejgyMWpw?= =?utf-8?B?OVA3MFNqcEtPdnFxc3RLVi9zeTkrS3NzOVlQUDZaa09FVWxSL2pyTTVDbVFI?= =?utf-8?B?bFErT2VNSXMxNzNtdkJ4OHlnMTZaMm5nQVdWMlhsMXU4VHVFeTc2SFV2ZnB5?= =?utf-8?B?enJ3T3N3TTBtVGZFMWI5dXhGdjlJaUpKdHN3dkNpakgxYlIxNGl0Q2c0Zk5C?= =?utf-8?B?eWhNeFNpNjdoUDhUTTM4SWFybit3K3d6NEo0dUNFb1I5U002d2FVOFExTG11?= =?utf-8?B?L1VXOGFUZjN3bC8yMFY4a1dtOW9VS1g0ZitMbklhbDl6ZzhCYXdGWHA1ZkU5?= =?utf-8?B?ZEtQWStMdnVOL1VBd0JQYUE1N1Z3UFNqSmFSUytJRjNJMUZCcDFGNE1OMXdY?= =?utf-8?B?aFE5SFFQRlE0UmREZithbFd4em5NcjdWeDh1bko0RVdGd2F1Yng4cW9BTVBj?= =?utf-8?B?cGNMZktqU1NzSlVQelptdVV2ZzZZdlVmMUFDTGtWdnlpdTMrMDRZbjRab2No?= =?utf-8?B?QWNUdUlUWXBhSHJYb2ZzTGRwSkRkelNJNVpuc2czQ25HanpzS3JWY0JORVF4?= =?utf-8?Q?eSplXCURzHPG3qxthV1+RjtTgVKfQXR1zwQOlMx?= X-MS-Exchange-CrossTenant-Network-Message-Id: a6742145-9212-425d-5461-08d97d07ce14 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2021 13:57:52.6592 (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: B5eFXYf7tgvbQeTjglw+vuHfg+vNUfZmLWhcvSm2KfRh5a1ogna3pM4TtXPbUAeiWWxHX4TdgrBbWmA3enn/bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5141 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] 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" On 9/17/2021 1:31 PM, Elad Nachman wrote: > Fix lack of multiple KNI requests handling support by introducing a > rotating ring mechanism for the sync buffer. > Thanks Elad for the patch. I have missed that 'rte_kni_handle_request()' can be called by multiple cores, at least kni sample app does that. In that case having multiple requests may end up multiple control command run at the same time from different cores and this may lead undefined behavior. Forcing to have single request at a time also simplifies to seriliaze the control commands to the device. What about your suggestion to return -EAGAIN, if the request is not processed by the userspace. And this can be detected by a new field in 'rte_kni_request' which kernel sets when the request issued and userspace unset when the processing done. 'kni_net_process_request()' can require that field to be unset before putting a new request. What do you think? > Prevent kni_net_change_rx_flags() from calling kni_net_process_request() > with a malformed request. > This is completely something else so can be dropped from this patch, but OK to add 'if (req.req_id)' check although current request is harmless since 'req' is already memset. > Bugzilla ID: 809 > > Signed-off-by: Elad Nachman > --- > kernel/linux/kni/kni_dev.h | 2 ++ > kernel/linux/kni/kni_misc.c | 2 ++ > kernel/linux/kni/kni_net.c | 25 +++++++++++++++++-------- > lib/kni/rte_kni.c | 14 +++++++------- > lib/kni/rte_kni_common.h | 1 + > 5 files changed, 29 insertions(+), 15 deletions(-) > > diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h > index c15da311ba..b9e8b3d10d 100644 > --- a/kernel/linux/kni/kni_dev.h > +++ b/kernel/linux/kni/kni_dev.h > @@ -74,6 +74,8 @@ struct kni_dev { > > void *sync_kva; > void *sync_va; > + unsigned int sync_ring_size; > + atomic_t sync_ring_idx; > > void *mbuf_kva; > void *mbuf_va; > diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c > index 2b464c4381..f3cee97818 100644 > --- a/kernel/linux/kni/kni_misc.c > +++ b/kernel/linux/kni/kni_misc.c > @@ -345,6 +345,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, > > kni->net_dev = net_dev; > kni->core_id = dev_info.core_id; > + kni->sync_ring_size = dev_info.sync_ring_size; > + kni->sync_ring_idx.counter = 0; > strncpy(kni->name, dev_info.name, RTE_KNI_NAMESIZE); > > /* Translate user space info into kernel space info */ > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c > index 611719b5ee..dc066cdd98 100644 > --- a/kernel/linux/kni/kni_net.c > +++ b/kernel/linux/kni/kni_net.c > @@ -110,6 +110,8 @@ kni_net_process_request(struct net_device *dev, struct rte_kni_request *req) > void *resp_va; > uint32_t num; > int ret_val; > + unsigned int idx; > + char *k_reqptr, *v_reqptr; > > ASSERT_RTNL(); > > @@ -122,10 +124,17 @@ kni_net_process_request(struct net_device *dev, struct rte_kni_request *req) > } > > mutex_lock(&kni->sync_lock); > - > + idx = atomic_read(&kni->sync_ring_idx); > + atomic_cmpxchg(&kni->sync_ring_idx, idx, > + (idx + 1) % kni->sync_ring_size); > /* Construct data */ > - memcpy(kni->sync_kva, req, sizeof(struct rte_kni_request)); > - num = kni_fifo_put(kni->req_q, &kni->sync_va, 1); > + k_reqptr = (char *)((uintptr_t)kni->sync_kva + > + sizeof(struct rte_kni_request) * idx); > + v_reqptr = (char *)((uintptr_t)kni->sync_va + > + sizeof(struct rte_kni_request) * idx); > + > + memcpy(k_reqptr, req, sizeof(struct rte_kni_request)); > + num = kni_fifo_put(kni->req_q, (void **)&v_reqptr, 1); > if (num < 1) { > pr_err("Cannot send to req_q\n"); > ret = -EBUSY; > @@ -147,14 +156,14 @@ kni_net_process_request(struct net_device *dev, struct rte_kni_request *req) > goto fail; > } > num = kni_fifo_get(kni->resp_q, (void **)&resp_va, 1); > - if (num != 1 || resp_va != kni->sync_va) { > + if (num != 1) { > /* This should never happen */ > pr_err("No data in resp_q\n"); > ret = -ENODATA; > goto fail; > } > > - memcpy(req, kni->sync_kva, sizeof(struct rte_kni_request)); > + memcpy(req, k_reqptr, sizeof(struct rte_kni_request)); > async: > ret = 0; > > @@ -681,13 +690,12 @@ kni_net_change_mtu(struct net_device *dev, int new_mtu) > static void > kni_net_change_rx_flags(struct net_device *netdev, int flags) > { > - struct rte_kni_request req; > + struct rte_kni_request req = { 0 }; > > memset(&req, 0, sizeof(req)); > > if (flags & IFF_ALLMULTI) { > req.req_id = RTE_KNI_REQ_CHANGE_ALLMULTI; > - > if (netdev->flags & IFF_ALLMULTI) > req.allmulti = 1; > else > @@ -703,7 +711,8 @@ kni_net_change_rx_flags(struct net_device *netdev, int flags) > req.promiscusity = 0; > } > > - kni_net_process_request(netdev, &req); > + if (req.req_id) > + kni_net_process_request(netdev, &req); > } > > /* > diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c > index d3e236005e..e921d41ce8 100644 > --- a/lib/kni/rte_kni.c > +++ b/lib/kni/rte_kni.c > @@ -31,6 +31,9 @@ > #define KNI_FIFO_COUNT_MAX 1024 > #define KNI_FIFO_SIZE (KNI_FIFO_COUNT_MAX * sizeof(void *) + \ > sizeof(struct rte_kni_fifo)) > +#define KNI_REQS_SIZE (KNI_FIFO_COUNT_MAX * \ > + sizeof(struct rte_kni_request) + \ > + sizeof(struct rte_kni_fifo)) > > #define KNI_REQUEST_MBUF_NUM_MAX 32 > > @@ -175,8 +178,8 @@ kni_reserve_mz(struct rte_kni *kni) > KNI_MEM_CHECK(kni->m_resp_q == NULL, resp_q_fail); > > snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_SYNC_ADDR_MZ_NAME_FMT, kni->name); > - kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, > - RTE_MEMZONE_IOVA_CONTIG); > + kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_REQS_SIZE, > + SOCKET_ID_ANY, RTE_MEMZONE_IOVA_CONTIG); > KNI_MEM_CHECK(kni->m_sync_addr == NULL, sync_addr_fail); > > return 0; > @@ -307,6 +310,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool, > kni->sync_addr = kni->m_sync_addr->addr; > dev_info.sync_va = kni->m_sync_addr->addr; > dev_info.sync_phys = kni->m_sync_addr->iova; > + dev_info.sync_ring_size = KNI_FIFO_COUNT_MAX; > > kni->pktmbuf_pool = pktmbuf_pool; > kni->group_id = conf->group_id; > @@ -544,11 +548,7 @@ rte_kni_handle_request(struct rte_kni *kni) > if (ret != 1) > return 0; /* It is OK of can not getting the request mbuf */ > > - if (req != kni->sync_addr) { > - RTE_LOG(ERR, KNI, "Wrong req pointer %p\n", req); > - return -1; > - } > - > + printf("%s: req %p id %u\n", __func__, req, req->req_id); > /* Analyze the request and call the relevant actions for it */ > switch (req->req_id) { > case RTE_KNI_REQ_CHANGE_MTU: /* Change MTU */ > diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h > index b547ea5501..a78b9bafa0 100644 > --- a/lib/kni/rte_kni_common.h > +++ b/lib/kni/rte_kni_common.h > @@ -110,6 +110,7 @@ struct rte_kni_device_info { > phys_addr_t resp_phys; > phys_addr_t sync_phys; > void * sync_va; > + unsigned int sync_ring_size; > > /* mbuf mempool */ > void * mbuf_va; >