On Wed, Dec 19, 2018 at 10:34:28AM +0100, Björn Töpel wrote:
> 
> On 2018-12-19 00:04, Alexei Starovoitov wrote:
> > On Mon, Dec 17, 2018 at 04:30:05PM +0100, Björn Töpel wrote:
> > > > 
> > > > Instead of introducing the XDP_ATTACH option to the bind call, can we
> > > > just make this association between rx queue id and xsk every single
> > > > time we bind? Then it is up to the user via the XDP program if he/she
> > > > wants to use this by calling xsk_redirect. No new option needed.
> > > > 
> > > 
> > > Nice! Then it would simply be a matter of adding the helper. Much better
> > > than extending the uapi. Thank you for pointing this out!
> > 
> > Magnus's by-default association approach sounds good to me.
> > I'm missing though why extra bpf helper is needed.
> > This soft-bind rx queue with xsk at the time
> > of normal bind() should work as-is and no program necessary.
> 
> Hmm, an XDP program has always been required. It's just whether the
> program needs an XSKMAP or not. The XDP_ATTACH can be seens as "use an
> internal map" -- and the mechanism to redirect using that map is via the
> bpf_xsk_redirect helper. What Magnus proposed was populating the builtin
> map unconditionally, and therefore removing the need for the XDP_ATTACH
> option.

well, I'm actually proposing to make af_xdp program optional
if hard coded queue->xsk mapping gives extra performance.

Reply via email to