patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@xilinx.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	"Min Hu (Connor)" <humin29@huawei.com>, <dev@dpdk.org>
Cc: <stable@dpdk.org>, Helin Zhang <helin.zhang@intel.com>,
	Ke Zhang <ke1x.zhang@intel.com>, Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH] kni: fix compile error
Date: Wed, 1 Jun 2022 16:49:37 +0100	[thread overview]
Message-ID: <81019950-46a3-d797-5c39-83ee8ea639e3@xilinx.com> (raw)
In-Reply-To: <a7d3cf50-1f36-01be-1609-dd6b2a2f1371@oktetlabs.ru>

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) <humin29@huawei.com>
>>>> ---
>>>>   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);
>>>
>>> .
> 


      reply	other threads:[~2022-06-01 15:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21  7:06 Min Hu (Connor)
2022-05-23  8:43 ` Ferruh Yigit
2022-05-31 16:42 ` Andrew Rybchenko
2022-06-01  1:52   ` Min Hu (Connor)
2022-06-01  8:47     ` Andrew Rybchenko
2022-06-01 15:49       ` Ferruh Yigit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81019950-46a3-d797-5c39-83ee8ea639e3@xilinx.com \
    --to=ferruh.yigit@xilinx.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=humin29@huawei.com \
    --cc=jslaby@suse.cz \
    --cc=ke1x.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).