Re: [bpf-next V1-RFC PATCH 01/14] xdp: base API for new XDP rx-queue info concept

2017-12-21 Thread Jesper Dangaard Brouer
On Mon, 18 Dec 2017 11:55:01 +0100 Jesper Dangaard Brouer wrote: > On Wed, 13 Dec 2017 19:34:40 -0700 > David Ahern wrote: > > > On 12/13/17 4:19 AM, Jesper Dangaard Brouer wrote: > > > + > > > +void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq) > > > +{ > > > + xdp_rxq->reg_state = REG_ST

Re: [bpf-next V1-RFC PATCH 01/14] xdp: base API for new XDP rx-queue info concept

2017-12-18 Thread Jesper Dangaard Brouer
On Mon, 18 Dec 2017 06:23:40 -0700 David Ahern wrote: > On 12/18/17 3:55 AM, Jesper Dangaard Brouer wrote: > > > > Handling return-errors in the drivers complicated the driver code, as it > > involves unraveling and deallocating other RX-rings etc (that were > > already allocated) if the reg fai

Re: [bpf-next V1-RFC PATCH 01/14] xdp: base API for new XDP rx-queue info concept

2017-12-18 Thread David Ahern
On 12/18/17 3:55 AM, Jesper Dangaard Brouer wrote: > > Handling return-errors in the drivers complicated the driver code, as it > involves unraveling and deallocating other RX-rings etc (that were > already allocated) if the reg fails. (Also notice next patch will allow > dev == NULL, if right pty

Re: [bpf-next V1-RFC PATCH 01/14] xdp: base API for new XDP rx-queue info concept

2017-12-18 Thread Jesper Dangaard Brouer
On Wed, 13 Dec 2017 19:34:40 -0700 David Ahern wrote: > On 12/13/17 4:19 AM, Jesper Dangaard Brouer wrote: > > + > > +void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq) > > +{ > > + xdp_rxq->reg_state = REG_STATE_UNREGISTRED; > > +} > > +EXPORT_SYMBOL_GPL(xdp_rxq_info_unreg); > > + > > +void

Re: [bpf-next V1-RFC PATCH 01/14] xdp: base API for new XDP rx-queue info concept

2017-12-13 Thread David Ahern
On 12/13/17 4:19 AM, Jesper Dangaard Brouer wrote: > + > +void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq) > +{ > + xdp_rxq->reg_state = REG_STATE_UNREGISTRED; > +} > +EXPORT_SYMBOL_GPL(xdp_rxq_info_unreg); > + > +void xdp_rxq_info_init(struct xdp_rxq_info *xdp_rxq) > +{ > + if (xdp_rx

[bpf-next V1-RFC PATCH 01/14] xdp: base API for new XDP rx-queue info concept

2017-12-13 Thread Jesper Dangaard Brouer
This patch only introduce the core data structures and API functions. All XDP enabled drivers must use the API before this info can used. There is a need for XDP to know more about the RX-queue a given XDP frames have arrived on. For both the XDP bpf-prog and kernel side. Instead of extending xd