[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180417174051.6b4c7fb2@cakuba.netronome.com>
Date: Tue, 17 Apr 2018 17:40:51 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: "Nikita V. Shirokov" <tehnerd@...nerd.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next 08/10] [bpf]: make netronome nfp compatible w/
bpf_xdp_adjust_tail
On Tue, 17 Apr 2018 16:08:29 -0700, Alexei Starovoitov wrote:
> On Mon, Apr 16, 2018 at 11:51:29PM -0700, Nikita V. Shirokov wrote:
> > w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as
> > well (only "decrease" of pointer's location is going to be supported).
> > changing of this pointer will change packet's size.
> > for nfp driver we will just calculate packet's length unconditionally
> >
> > Signed-off-by: Nikita V. Shirokov <tehnerd@...nerd.com>
> > ---
> > drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> > index 1eb6549f2a54..d9111c077699 100644
> > --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> > +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> > @@ -1722,7 +1722,7 @@ static int nfp_net_rx(struct nfp_net_rx_ring *rx_ring, int budget)
> >
> > act = bpf_prog_run_xdp(xdp_prog, &xdp);
> >
> > - pkt_len -= xdp.data - orig_data;
> > + pkt_len = xdp.data_end - xdp.data;
>
> Looks correct, but Jakub please review.
Indeed:
Acked-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
Thanks!
Powered by blists - more mailing lists