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 61BD3A0548 for ; Tue, 31 May 2022 18:42:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 588CD4281A; Tue, 31 May 2022 18:42:26 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id D306F40143; Tue, 31 May 2022 18:42:23 +0200 (CEST) Received: from [192.168.1.38] (unknown [188.170.81.145]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 381B586; Tue, 31 May 2022 19:42:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 381B586 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1654015343; bh=tM4A3T+mPsFZ3wY6lXgGtXVttfTYzVft+Iy+a1hE038=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nZ3zW5isiaFvvUnqsnzgfgjcb//7o26eOT6nqvWxsmKqgElngu4e3huf8Gp3leFxq +pEVyvICv5HU6J8Ke9+dmxdebTEIRL69Q+RRxVcpDOfi0kJ1/McUJegu5tW5c5iDtY YwDdfLOJlEjWya/9GeV3fIkud7JmmS6tz2RqL2K0= Message-ID: Date: Tue, 31 May 2022 19:42:22 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] kni: fix compile error Content-Language: en-US To: "Min Hu (Connor)" , dev@dpdk.org Cc: stable@dpdk.org, Ferruh Yigit , Helin Zhang References: <20220521070642.35413-1-humin29@huawei.com> From: Andrew Rybchenko In-Reply-To: <20220521070642.35413-1-humin29@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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); 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); >