[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220318213012.482a1edf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 18 Mar 2022 21:30:12 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Yinjun Zhang <yinjun.zhang@...igine.com>
Cc: Simon Horman <simon.horman@...igine.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
oss-drivers@...igine.com
Subject: Re: [PATCH net-next 10/10] nfp: nfdk: implement xdp tx path for
NFDK
On Sat, 19 Mar 2022 09:55:46 +0800 Yinjun Zhang wrote:
> On Fri, Mar 18, 2022 at 10:56:45AM -0700, Jakub Kicinski wrote:
> > On Fri, 18 Mar 2022 11:13:02 +0100 Simon Horman wrote:
> > > From: Yinjun Zhang <yinjun.zhang@...igine.com>
> > >
> > > Due to the different definition of txbuf in NFDK comparing to NFD3,
> > > there're no pre-allocated txbufs for xdp use in NFDK's implementation,
> > > we just use the existed rxbuf and recycle it when xdp tx is completed.
> > >
> > > For each packet to transmit in xdp path, we cannot use more than
> > > `NFDK_TX_DESC_PER_SIMPLE_PKT` txbufs, one is to stash virtual address,
> > > and another is for dma address, so currently the amount of transmitted
> > > bytes is not accumulated. Also we borrow the last bit of virtual addr
> > > to indicate a new transmitted packet due to address's alignment
> > > attribution.
> > >
> > > Signed-off-by: Yinjun Zhang <yinjun.zhang@...igine.com>
> > > Signed-off-by: Fei Qin <fei.qin@...igine.com>
> > > Signed-off-by: Simon Horman <simon.horman@...igine.com>
> >
> > Breaks 32 bit :(
>
> You mean 32-bit arch? I'd thought of that, but why needn't
> `NFCT_PTRMASK` take that into account?
Simpler than that, I just meant the build.
It's about casting between 64b types and pointers:
drivers/net/ethernet/netronome/nfp/nfdk/dp.c: In function ‘nfp_nfdk_xdp_complete’:
drivers/net/ethernet/netronome/nfp/nfdk/dp.c:827:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
827 | (void *)NFDK_TX_BUF_PTR(txbuf[0].raw),
| ^
drivers/net/ethernet/netronome/nfp/nfdk/dp.c: In function ‘nfp_nfdk_tx_xdp_buf’:
drivers/net/ethernet/netronome/nfp/nfdk/dp.c:909:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
909 | txbuf[0].raw = (u64)rxbuf->frag | NFDK_TX_BUF_INFO_SOP;
| ^
Powered by blists - more mailing lists