kernel 6.1 API change: netif_napi_add() uses weight==64 by default

Change-Id: I7e70659e43c930a4c220eaef29cfb4e8d7a6eb0d
This commit is contained in:
Harald Welte 2022-11-30 16:42:51 +01:00
parent 783c356196
commit ae5aa32fe0
2 changed files with 10 additions and 0 deletions

View File

@ -202,7 +202,12 @@ int vb_net_register(struct voicebus *vb, const char *board_name)
netdev->promiscuity = 0;
netdev->flags |= IFF_NOARP;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
/* 64 is NAPI_POLL_WEIGHT, i.e. the default */
netif_napi_add(netdev, &vb->napi, vb_net_poll);
#else
netif_napi_add(netdev, &vb->napi, vb_net_poll, 64);
#endif
skb_queue_head_init(&vb->captured_packets);
res = register_netdev(netdev);

View File

@ -656,7 +656,12 @@ wctc4xxp_net_register(struct wcdte *wc)
netdev->promiscuity = 0;
netdev->flags |= IFF_NOARP;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
/* 64 is NAPI_POLL_WEIGHT, i.e. the default */
netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll);
#else
netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
#endif
res = register_netdev(netdev);
if (res) {