> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Friday, April 15, 2022 8:30 PM
> To: Ferruh Yigit <ferruh.yi...@xilinx.com>
> Cc: Gagandeep Singh <g.si...@nxp.com>; Harold Huang
> <baymaxhu...@gmail.com>; dev@dpdk.org
> Subject: Re: [PATCH] kni: update kernel API to receive packets
> 
> On Fri, 15 Apr 2022 13:30:33 +0100
> Ferruh Yigit <ferruh.yi...@xilinx.com> wrote:
> 
> > >> But this change would cause KNI kernel module does not work in the
> > >> old kernel without this patch. I suggested using netif_rx_ni to keep
> compatibility.
> > >
> > > netif_rx() API exists from very older versions of kernel before
> > > v2.6. There will be no compilation issues. Only difference was,
> > > netif_rx_ni() can be used in noninterrupt contexts to improve performance.
> >
> > May not be compilation issue, but with old kernels won't the behavior
> > be different when 'netif_rx_ni()' switched to 'netif_rx()
> 
> Probably best handled by #ifdef on kernel version but will be a mess for
> backports to distro kernels.
> 
> Looks like:
> 
>       Older      -> New
>       netif_rx_ni   netif_rx
>       neitf_rx      __netif_rx

If it is ok for everyone, I can add #ifdef for kernel version >= 5.17 to use 
API netif_rx, to
avoid any functional/performance impact with old kernels. 

Reply via email to