Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-03-06 Thread chetan loke
On Tue, Jan 31, 2017 at 9:09 PM, John Fastabend wrote: >> If I understand correctly, the difficulty lies in v3 requiring that the >> timer "close" the block when the timer expires. That may not be worth >> implementing, indeed. >> > > Yep that is where I just gave up and decided it wasn't worth i

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-02-03 Thread Jason Wang
On 2017年01月28日 05:33, John Fastabend wrote: This adds ndo ops for upper layer objects to request direct DMA from the network interface into memory "slots". The slots must be DMA'able memory given by a page/offset/size vector in a packet_ring_buffer structure. The PF_PACKET socket interface can

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-31 Thread John Fastabend
On 17-01-30 05:31 PM, Willem de Bruijn wrote: V3 header formats added bulk polling via socket calls and timers used in the polling interface to return every n milliseconds. Currently, I don't see any way to support this in hardware because we can't know if the hardware is in the

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-31 Thread John Fastabend
[...] >>> The ndo operations and new socket option PACKET_RX_DIRECT work by giving a queue_index to run the direct dma operations over. Once setsockopt returns successfully the indicated queue is mapped directly to the requesting application and can not be used for othe

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-31 Thread Jesper Dangaard Brouer
(next submission fix subj. ineterface -> interface) On Mon, 30 Jan 2017 13:51:55 -0800 John Fastabend wrote: > On 17-01-30 10:16 AM, Jesper Dangaard Brouer wrote: > > On Fri, 27 Jan 2017 13:33:44 -0800 John Fastabend > > wrote: > > > >> This adds ndo ops for upper layer objects to request

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-30 Thread Willem de Bruijn
>>> V3 header formats added bulk polling via socket calls and timers >>> used in the polling interface to return every n milliseconds. Currently, >>> I don't see any way to support this in hardware because we can't >>> know if the hardware is in the middle of a DMA operation or not >>> on a slot. S

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-30 Thread John Fastabend
On 17-01-30 10:16 AM, Jesper Dangaard Brouer wrote: > On Fri, 27 Jan 2017 13:33:44 -0800 John Fastabend > wrote: > >> This adds ndo ops for upper layer objects to request direct DMA from >> the network interface into memory "slots". The slots must be DMA'able >> memory given by a page/offset/siz

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-30 Thread Jesper Dangaard Brouer
On Fri, 27 Jan 2017 13:33:44 -0800 John Fastabend wrote: > This adds ndo ops for upper layer objects to request direct DMA from > the network interface into memory "slots". The slots must be DMA'able > memory given by a page/offset/size vector in a packet_ring_buffer > structure. > > The PF_PAC

[RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-01-27 Thread John Fastabend
This adds ndo ops for upper layer objects to request direct DMA from the network interface into memory "slots". The slots must be DMA'able memory given by a page/offset/size vector in a packet_ring_buffer structure. The PF_PACKET socket interface can use these ndo_ops to do zerocopy RX from the ne