lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJ+HfNhuhyjRXoTXLhR3CbzhvYZZNZXYcbPxYAokL7HuDT6nAw@mail.gmail.com>
Date:   Fri, 13 Sep 2019 06:33:01 +0200
From:   Björn Töpel <bjorn.topel@...il.com>
To:     Ciara Loftus <ciara.loftus@...el.com>
Cc:     Netdev <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Björn Töpel <bjorn.topel@...el.com>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        Bruce Richardson <bruce.richardson@...el.com>,
        bpf <bpf@...r.kernel.org>,
        intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
        Kevin Laatz <kevin.laatz@...el.com>
Subject: Re: [PATCH bpf-next 2/3] ixgbe: fix xdp handle calculations

On Wed, 11 Sep 2019 at 19:27, Ciara Loftus <ciara.loftus@...el.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@...el.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ