patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] kni: fix compile error
@ 2022-05-21  7:06 Min Hu (Connor)
  2022-05-23  8:43 ` Ferruh Yigit
  2022-05-31 16:42 ` Andrew Rybchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Min Hu (Connor) @ 2022-05-21  7:06 UTC (permalink / raw)
  To: dev; +Cc: Min Hu (Connor), stable, Ferruh Yigit, Helin Zhang

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);
 
 		/* 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);
 
 	ret = kni_net_process_request(netdev, &req);
 
-- 
2.33.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-01 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-21  7:06 [PATCH] kni: fix compile error 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 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).