Re: [PATCH bpf-next 13/15] xsk: support for Tx

2018-04-25 Thread Björn Töpel
2018-04-25 21:00 GMT+02:00 Willem de Bruijn : [...] >>> static inline struct xdp_desc *xskq_peek_desc(struct xsk_queue *q, >>> + struct xdp_desc *desc) >>> +{ >>> + struct xdp_rxtx_ring *ring; >>> + >>> + if (q->cons_tail == q->cons_head) { >>

Re: [PATCH bpf-next 13/15] xsk: support for Tx

2018-04-25 Thread Willem de Bruijn
>>> +{ >>> + struct net_device *dev = skb->dev; >>> + struct sk_buff *orig_skb = skb; >>> + struct netdev_queue *txq; >>> + int ret = NETDEV_TX_BUSY; >>> + bool again = false; >>> + >>> + if (unlikely(!netif_running(dev) || !netif_carrier_ok(dev))) >>> +

Re: [PATCH bpf-next 13/15] xsk: support for Tx

2018-04-25 Thread Magnus Karlsson
On Tue, Apr 24, 2018 at 6:57 PM, Willem de Bruijn wrote: > On Mon, Apr 23, 2018 at 9:56 AM, Björn Töpel wrote: >> From: Magnus Karlsson >> >> Here, Tx support is added. The user fills the Tx queue with frames to >> be sent by the kernel, and let's the kernel know using the sendmsg >> syscall. >>

Re: [PATCH bpf-next 13/15] xsk: support for Tx

2018-04-24 Thread Willem de Bruijn
On Mon, Apr 23, 2018 at 9:56 AM, Björn Töpel wrote: > From: Magnus Karlsson > > Here, Tx support is added. The user fills the Tx queue with frames to > be sent by the kernel, and let's the kernel know using the sendmsg > syscall. > > Signed-off-by: Magnus Karlsson > +static int xsk_xmit_skb(str

[PATCH bpf-next 13/15] xsk: support for Tx

2018-04-23 Thread Björn Töpel
From: Magnus Karlsson Here, Tx support is added. The user fills the Tx queue with frames to be sent by the kernel, and let's the kernel know using the sendmsg syscall. Signed-off-by: Magnus Karlsson --- net/xdp/xsk.c | 147 +++- net/xdp/xsk