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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 31 May 2018 09:15:11 -0700
From:   Song Liu <liu.song.a23@...il.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     Networking <netdev@...r.kernel.org>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Song Liu <songliubraving@...com>,
        John Fastabend <john.fastabend@...il.com>
Subject: Re: [bpf-next V2 PATCH 5/8] virtio_net: implement flush flag for ndo_xdp_xmit

On Thu, May 31, 2018 at 2:00 AM, Jesper Dangaard Brouer
<brouer@...hat.com> wrote:
> When passed the XDP_XMIT_FLUSH flag virtnet_xdp_xmit now performs the
> same virtqueue_kick as virtnet_xdp_flush.
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>

Acked-by: Song Liu <songliubraving@...com>

> ---
>  drivers/net/virtio_net.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 4ed823625953..62ba8aadd8e6 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -481,7 +481,7 @@ static int virtnet_xdp_xmit(struct net_device *dev,
>         int err;
>         int i;
>
> -       if (unlikely(flags & ~XDP_XMIT_FLAGS_NONE))
> +       if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
>                 return -EINVAL;
>
>         qp = vi->curr_queue_pairs - vi->xdp_queue_pairs + smp_processor_id();
> @@ -507,6 +507,10 @@ static int virtnet_xdp_xmit(struct net_device *dev,
>                         drops++;
>                 }
>         }
> +
> +       if (flags & XDP_XMIT_FLUSH)
> +               virtqueue_kick(sq->vq);
> +
>         return n - drops;
>  }
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ