bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@gmail.com>
To: Ciara Loftus <ciara.loftus@intel.com>
Cc: Netdev <netdev@vger.kernel.org>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Björn Töpel" <bjorn.topel@intel.com>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>,
	bpf <bpf@vger.kernel.org>,
	intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
	"Kevin Laatz" <kevin.laatz@intel.com>
Subject: Re: [PATCH bpf-next 2/3] ixgbe: fix xdp handle calculations
Date: Fri, 13 Sep 2019 06:33:01 +0200	[thread overview]
Message-ID: <CAJ+HfNhuhyjRXoTXLhR3CbzhvYZZNZXYcbPxYAokL7HuDT6nAw@mail.gmail.com> (raw)
In-Reply-To: <20190911172435.21042-2-ciara.loftus@intel.com>

On Wed, 11 Sep 2019 at 19:27, Ciara Loftus <ciara.loftus@intel.com> wrote:
>
> Commit 7cbbf9f1fa23 ("ixgbe: fix xdp handle calculations") reintroduced
> the addition of the umem headroom to the xdp handle in the ixgbe_zca_free,
> ixgbe_alloc_buffer_slow_zc and ixgbe_alloc_buffer_zc functions. However,
> the headroom is already added to the handle in the function
> ixgbe_run_xdp_zc. This commit removes the latter addition and fixes the
> case where the headroom is non-zero.
>
> Fixes: 7cbbf9f1fa23 ("ixgbe: fix xdp handle calculations")
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
> index ad802a8909e0..5ed8b5a257cf 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
> @@ -145,7 +145,7 @@ static int ixgbe_run_xdp_zc(struct ixgbe_adapter *adapter,
>  {
>         struct xdp_umem *umem = rx_ring->xsk_umem;
>         int err, result = IXGBE_XDP_PASS;
> -       u64 offset = umem->headroom;
> +       u64 offset;

...and same comment as from the i40e patch: Reverse xmas tree, please.


Cheers,
Björn

>         struct bpf_prog *xdp_prog;
>         struct xdp_frame *xdpf;
>         u32 act;
> @@ -153,7 +153,7 @@ static int ixgbe_run_xdp_zc(struct ixgbe_adapter *adapter,
>         rcu_read_lock();
>         xdp_prog = READ_ONCE(rx_ring->xdp_prog);
>         act = bpf_prog_run_xdp(xdp_prog, xdp);
> -       offset += xdp->data - xdp->data_hard_start;
> +       offset = xdp->data - xdp->data_hard_start;
>
>         xdp->handle = xsk_umem_adjust_offset(umem, xdp->handle, offset);
>
> --
> 2.17.1
>

  parent reply	other threads:[~2019-09-13  4:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 17:24 [PATCH bpf-next 1/3] i40e: fix xdp handle calculations Ciara Loftus
2019-09-11 17:24 ` [PATCH bpf-next 2/3] ixgbe: " Ciara Loftus
2019-09-12 16:28   ` [Intel-wired-lan] " Bowers, AndrewX
2019-09-13  4:33   ` Björn Töpel [this message]
2019-09-11 17:24 ` [PATCH bpf-next 3/3] samples/bpf: fix xdpsock l2fwd tx for unaligned mode Ciara Loftus
2019-09-12 16:27 ` [Intel-wired-lan] [PATCH bpf-next 1/3] i40e: fix xdp handle calculations Bowers, AndrewX
2019-09-13  4:32 ` Björn Töpel

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=CAJ+HfNhuhyjRXoTXLhR3CbzhvYZZNZXYcbPxYAokL7HuDT6nAw@mail.gmail.com \
    --to=bjorn.topel@gmail.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=kevin.laatz@intel.com \
    --cc=magnus.karlsson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).