public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: David Ahern <dsahern@gmail•com>,
	Jesper Dangaard Brouer <brouer@redhat•com>
Cc: Jason Wang <jasowang@redhat•com>,
	"xdp-newbies\@vger.kernel.org" <xdp-newbies@vger•kernel.org>,
	"netdev\@vger.kernel.org" <netdev@vger•kernel.org>
Subject: Re: error loading xdp program on virtio nic
Date: Sat, 23 Nov 2019 14:27:48 +0100	[thread overview]
Message-ID: <87k17q3ep7.fsf@toke.dk> (raw)
In-Reply-To: <1fc9364a-ab96-e085-1fc5-9ed29f43f815@gmail.com>

David Ahern <dsahern@gmail•com> writes:

> On 11/22/19 9:57 AM, Jesper Dangaard Brouer wrote:
>> Implementation wise, I would not add flags to xdp_buff / xdp_md.
>> Instead I propose in[1] slide 46, that the verifier should detect the
>> XDP features used by a BPF-prog.  If you XDP prog doesn't use e.g.
>> XDP_TX, then you should be allowed to run it on a virtio_net device
>> with less queue configured, right?
>
> Thanks for the reference and yes, that is the goal: allow XDP in the
> most use cases possible. e.g., Why limit XDP_DROP which requires no
> resources because XDP_TX does not work?
>
> I agree a flag in the api is an ugly way to allow it. For the verifier
> approach, you mean add an internal flag (e.g., bitmask of return codes)
> that the program uses and the NIC driver can check at attach time?

Yes, that's more or less what we've discussed. With the actual set of
flags, and the API for the driver (new ndo?) TBD. Suggestions welcome; I
anticipate this is something Jesper and I need to circle back to soonish
in any case (unless someone beats us to it!).

-Toke


  reply	other threads:[~2019-11-23 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c484126f-c156-2a17-b47d-06d08121c38b@gmail.com>
     [not found] ` <89f56317-5955-e692-fcf0-ee876aae068b@redhat.com>
     [not found]   ` <3dc7b9d8-bcb2-1a90-630e-681cbf0f1ace@gmail.com>
     [not found]     ` <18659bd0-432e-f317-fa8a-b5670a91c5b9@redhat.com>
     [not found]       ` <f7b8df14-ef7f-be76-a990-b9d71139bcaa@gmail.com>
     [not found]         ` <20191121072625.3573368f@carbon>
     [not found]           ` <4686849f-f3b8-dd1d-0fe4-3c176a37b67a@redhat.com>
     [not found]             ` <df4ae5e7-3f79-fd28-ea2e-43612ff61e6f@gmail.com>
     [not found]               ` <f7b19bae-a9cf-d4bf-7eee-bfe644d87946@redhat.com>
     [not found]                 ` <8324a37e-5507-2ae6-53f6-949c842537e0@gmail.com>
2019-11-22 16:57                   ` error loading xdp program on virtio nic Jesper Dangaard Brouer
2019-11-22 17:42                     ` David Ahern
2019-11-23 13:27                       ` Toke Høiland-Jørgensen [this message]
2019-11-25  2:42                     ` Jason Wang

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=87k17q3ep7.fsf@toke.dk \
    --to=toke@redhat$(echo .)com \
    --cc=brouer@redhat$(echo .)com \
    --cc=dsahern@gmail$(echo .)com \
    --cc=jasowang@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xdp-newbies@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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