All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	bpf@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net,
	kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net,
	alexander.duyck@gmail.com
Subject: Re: [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine
Date: Thu, 17 Dec 2020 12:31:09 -0800	[thread overview]
Message-ID: <4d9e2dd071314f73136d77912cb9cc40d4557c80.camel@kernel.org> (raw)
In-Reply-To: <20201217182845.GB43061@ranger.igk.intel.com>

On Thu, 2020-12-17 at 19:28 +0100, Maciej Fijalkowski wrote:
> On Thu, Dec 17, 2020 at 10:16:06AM -0800, Saeed Mahameed wrote:
> > On Wed, 2020-12-16 at 16:01 +0100, Lorenzo Bianconi wrote:
> > > > On Tue, 15 Dec 2020 14:47:10 +0100
> > > > Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
> > > > 
> > > > > [...]
> > > > > > >  	xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp);
> > > > > > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > > > > > > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > > > > > > index 4dbbbd49c389..fcd1ca3343fb 100644
> > > > > > > --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > > > > > > +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > > > > > > @@ -2393,12 +2393,12 @@ static int
> > > > > > > i40e_clean_rx_irq(struct
> > > > > > > i40e_ring *rx_ring, int budget)
> > > > > > >  
> > > > > > >  		/* retrieve a buffer from the ring */
> > > > > > >  		if (!skb) {
> > > > > > > -			xdp.data = page_address(rx_buffer-
> > > > > > > > page) +
> > > > > > > -				   rx_buffer->page_offset;
> > > > > > > -			xdp.data_meta = xdp.data;
> > > > > > > -			xdp.data_hard_start = xdp.data -
> > > > > > > -					      i40e_rx_offset(rx
> > > > > > > _ring);
> > > > > > > -			xdp.data_end = xdp.data + size;
> > > > > > > +			unsigned int offset =
> > > > > > > i40e_rx_offset(rx_ring);  
> > > > > > 
> > > > > > I now see that we could call the i40e_rx_offset() once per
> > > > > > napi, so can
> > > > > > you pull this variable out and have it initialized a single
> > > > > > time? Applies
> > > > > > to other intel drivers as well.  
> > 
> > How is this related to this series? i suggest to keep this series
> > clean
> > of vendor specific unrelated optimizations, this must be done in a
> > separate patchset.
> 
> Well, Lorenzo explicitly is touching the thing that I referred to, so
> I
> just ask if he can optimize it while he's at it.
> 
> Of course I'm fine with addressing this by myself once -next opens :)
> 
Oh, don't get me wrong I am ok with doing this now, and i can do it my
self if you want :), but it shouldn't be part of the this series, so we
won't confuse others who want to implement XDP in the future, that's
all.


  reply	other threads:[~2020-12-17 20:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12 17:41 [PATCH v3 bpf-next 0/2] introduce xdp_init_buff/xdp_prepare_buff Lorenzo Bianconi
2020-12-12 17:41 ` [PATCH v3 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine Lorenzo Bianconi
2020-12-16  8:35   ` Jesper Dangaard Brouer
2020-12-16 14:56     ` Lorenzo Bianconi
2020-12-12 17:41 ` [PATCH v3 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff " Lorenzo Bianconi
2020-12-15 12:36   ` Maciej Fijalkowski
2020-12-15 13:47     ` Lorenzo Bianconi
2020-12-15 14:51       ` Daniel Borkmann
2020-12-15 15:06         ` Lorenzo Bianconi
2020-12-15 15:13           ` Maciej Fijalkowski
2020-12-15 20:36             ` Lorenzo Bianconi
2020-12-16  8:30             ` Jesper Dangaard Brouer
2020-12-16  8:52       ` Jesper Dangaard Brouer
2020-12-16 15:01         ` Lorenzo Bianconi
2020-12-17 18:16           ` Saeed Mahameed
2020-12-17 18:28             ` Maciej Fijalkowski
2020-12-17 20:31               ` Saeed Mahameed [this message]
2020-12-14 15:32 ` [PATCH v3 bpf-next 0/2] introduce xdp_init_buff/xdp_prepare_buff Martin Habets
2020-12-14 17:53 ` Camelia Alexandra Groza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d9e2dd071314f73136d77912cb9cc40d4557c80.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=alexander.duyck@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.