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 808D7A0548; Wed, 1 Jun 2022 17:49:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 262A840689; Wed, 1 Jun 2022 17:49:46 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2089.outbound.protection.outlook.com [40.107.244.89]) by mails.dpdk.org (Postfix) with ESMTP id 0A30C4003F; Wed, 1 Jun 2022 17:49:44 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L1z73pUQtmw3NauiwZLrwkePmOVxow/D3Vn5qViD52CkOgEaSBqMMbOD/bns71UQrtaXBnxi5Z1SOR5cvlDxKz3c+cfB94J+PG2wAjlkLYgURvhkM+6x8CYXgXRMoVDxuhZlb0G/sLDctSQst+S7eDiINRgWNt7Y6SWZpJHrkuYLncxLHlVXGqUHC0GAagPq5m3h4Lgqpnf8DlyBgxy6vX3MvQOP5PmUjF8KiavJYh+J1hZ/MmSkGUQ0Rjn+JhJSiwW02UGNkx36rg8hbyMkKY4ryEkCK4NHos6e9UU+mVthFgR4Xqm5hn0C4afeBXdw/nwILv5WYomAaroT4eoKaA== 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=sWtIDhT/16PlrZugW6IMSJ+SPuNozh5ng4Pr0BohIOc=; b=PLBJwj0sgMIIP6G5NTCdja3EZil3rr1iPIeejudAxG9r0LtREaG07R2lLS9aESaNzkaptFMWuoD4UtipZTgwzDR598WATVFpNh8NPj5XqUHOaQle4aneRqeR9hWXJPojcXK8L+wJrL8DgMXp6czU3VbwT+8KXDrTtKQuCbjNY9OS522OgQXX/j1t4R51V5Z3hBzJk3vGJK8Ao7cIQDC0aApB6vVGoQ08H2KeQ+1rHKE8gHaNAJjc3CtGswAYgKL8x6WcgTvnFOrWtXtu3fu8F+i715EkTSeVJo4e6BDCGmGs3Oz5TfmtqTSs+UYuL6f9nkdVbW524liIB8Bkt0pFpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=oktetlabs.ru smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sWtIDhT/16PlrZugW6IMSJ+SPuNozh5ng4Pr0BohIOc=; b=NN+WEmZsWrApHxFFlkT3Q4kFhPthg102fHGkL+3uuGFEsQz5u6PJpxe/k1xvsHNMAc2+hzbQCNrUQa40XzQPmJlGvtgNLvBkHmVkIsY6+lMepVuxW3Y5p4JEkednZt1VsFGuQC86nTMQuwOBmPY3Vpq8obTyDd9TtmTcsgg3698= Received: from SN7P222CA0014.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:124::8) by SN4PR0201MB3598.namprd02.prod.outlook.com (2603:10b6:803:4b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Wed, 1 Jun 2022 15:49:41 +0000 Received: from SN1NAM02FT0060.eop-nam02.prod.protection.outlook.com (2603:10b6:806:124:cafe::a7) by SN7P222CA0014.outlook.office365.com (2603:10b6:806:124::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12 via Frontend Transport; Wed, 1 Jun 2022 15:49:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by SN1NAM02FT0060.mail.protection.outlook.com (10.97.4.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5314.12 via Frontend Transport; Wed, 1 Jun 2022 15:49:39 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 1 Jun 2022 16:49:38 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 1 Jun 2022 16:49:38 +0100 Envelope-to: andrew.rybchenko@oktetlabs.ru, humin29@huawei.com, dev@dpdk.org, stable@dpdk.org, helin.zhang@intel.com, ke1x.zhang@intel.com, jslaby@suse.cz Received: from [10.71.119.122] (port=57295) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nwQbJ-0003KC-DO; Wed, 01 Jun 2022 16:49:38 +0100 Message-ID: <81019950-46a3-d797-5c39-83ee8ea639e3@xilinx.com> Date: Wed, 1 Jun 2022 16:49:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] kni: fix compile error Content-Language: en-US To: Andrew Rybchenko , "Min Hu (Connor)" , CC: , Helin Zhang , Ke Zhang , Jiri Slaby References: <20220521070642.35413-1-humin29@huawei.com> <242997ca-ba66-f923-892a-10f9e105cb20@huawei.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a7af4768-1646-4706-2787-08da43e65674 X-MS-TrafficTypeDiagnostic: SN4PR0201MB3598: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: nndCqXUwBrBnbZLkhP7uJjFBQC9TMPp5nCgAg3PZYFoS2unCuyN8nu44wPCq5C6xVUun0YinNRKDyixFZByh/NxqzBCvaKCyyjZD+yNt/SCrFFUDhFxWGAvteFnoYcYpAhKprPw69zG8rj0x6PeCNp2KB8YjBjNuUeMX/e4bjaYGKESHtXt6oyXm/E89uvYDZHNjAyspHANeFmSUnJNMW0do9ArCC90P/zoXgGAVrDH+5mNTlTwZQzPWx0ld7gcAn4DFYYH7XAGC8ylpfDPsBFUrHNkASdME0oplHAPGs4lHr9zKni2+CE1WnStwu/2rVV2cAy3gHo0gkOx9u/5NAfZHK8pgjJ8nW79BwPWaQuV+y8Dw4c8bDLComdxrx3apszkEHeM8c02yE7tcetPZxwWGvkOqLkFHF1AgaAtvKo/p9jTjzT/oDPYXIZvnYV9MioDfqg/ehN+g1xVj4P6fNXFmbj3nPfTz83JuXKj/onMYzPEADZZE8wACrl+NAZ18SUgQD1l0j2s470wu2ZGnaM7etgAT+TAqGj7lNQUbru0ndSKDw3cQ5xWh+Kj1CuMU9LTs+rp2ZVrbWnpJrTcxTcBwxvrtWcvOAj0HKV2rIQYBT8/W1Q65IqTdGyde2cJ148Nq5JbNF1PZ4ZEQjYJEbjAYQZeOXc7nR4+m1VoSR0XlN+1t62tzgC2RoX1D0EQlnmCptPNsnTwD9WG4/pe90bt42vlD3geqDTc0gmt7O9EQpbWO8KKXN7rqKq0PDLR7M3PE8xlpjLvBlV6sanxFNM6Aw8lYOXrfEeENSUfQPD6/BqxvW6bD/tXCVClZE86HsKVQyQWK8NqcHJkZZi64k1aQL398fJrvMfRk9ukNCEs= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(70206006)(7636003)(2906002)(356005)(82310400005)(53546011)(83380400001)(36756003)(54906003)(508600001)(70586007)(110136005)(8676002)(316002)(966005)(4326008)(31686004)(44832011)(426003)(336012)(186003)(5660300002)(2616005)(47076005)(36860700001)(40460700003)(31696002)(9786002)(8936002)(26005)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 15:49:39.5682 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7af4768-1646-4706-2787-08da43e65674 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0060.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0201MB3598 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 6/1/2022 9:47 AM, Andrew Rybchenko wrote: > On 6/1/22 04:52, Min Hu (Connor) wrote: >> Hi, Andrew , >> >> 在 2022/6/1 0:42, Andrew Rybchenko 写道: >>> On 5/21/22 10:06, Min Hu (Connor) wrote: >>>> When kernel version change into 5.18 from 5.17, 'netif_rx_ni' is >>>> discard. >>>> It is replaced by 'netif_rx' and this API is also supported in the >>>> version below 5.18. >>>> >>>> This patch fixed it. >>>> >>>> Fixes: d89a58dfe90b ("kni: support chained mbufs") >>>> Cc: stable@dpdk.org >>>> >>>> Signed-off-by: Min Hu (Connor) >>>> --- >>>>   kernel/linux/kni/kni_net.c | 4 ++-- >>>>   1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c >>>> index 29e5b9e21f..e19f03285e 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); >>> >>> I think the approach in [1] is the right one. Any comments? >>> >>> [1] >>> https://patches.dpdk.org/project/dpdk/patch/20220525102641.20982-1-jslaby@suse.cz/ >>> >>> >>>>           /* Update statistics */ >>>>           dev->stats.rx_bytes += len; >>>> @@ -779,7 +779,7 @@ kni_net_set_mac(struct net_device *netdev, void *p) >>>>           return -EADDRNOTAVAIL; >>>>       memcpy(req.mac_addr, addr->sa_data, netdev->addr_len); >>>> -    memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); >>>> +    memcpy((void *)(netdev->dev_addr), addr->sa_data, >>>> netdev->addr_len); >> When compile, it will report a warning, because it claims that the >> parameter types must be the same. >> void *memcpy(void *destin, void *source, unsigned n); >> >> so this is what I am doing. > > I think it is a separate story vs netif_rx_ni(). So, it should not be in > the same patch. IMHO, it is closer to [1] > > [1] > https://patches.dpdk.org/project/dpdk/patch/20220601015925.35304-1-humin29@huawei.com/ > > > Am I missing something? > There are two build errors because of kernel side changes. - netif_rx_ni(). Following patch seems correct fix with small change requests: https://patchwork.dpdk.org/project/dpdk/patch/20220525102641.20982-1-jslaby@suse.cz/ - 'net_dev->dev_addr' being const, following patch is in correct direction: https://patchwork.dpdk.org/project/dpdk/patch/20220601054525.7573-1-ke1x.zhang@intel.com/ >>> >>> I don't understand why the change is needed and the patch description >>> does not shed any light on it. >>> >>>>       ret = kni_net_process_request(netdev, &req); >>> >>> . >