Re: [PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-31 Thread Sowmini Varadhan
On (12/30/16 23:59), Willem de Bruijn wrote: > > Actually I'm not averse to looking at extensions (or at least, > > place-holders) to allow variable sized slots- do you have any > > suggestions? > > It is probably enough to just enforce that tp_next_offset is always > sane. Either that it points

Re: [PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-30 Thread Willem de Bruijn
>> What is the issue with using separate sockets that you are >> having? I generally end up using that even with V2. > > Why do you end up having to use 2 sockets with V2? That part > worked out quite nicely for my case (for a simple netserver like > req/resp handler). Yes, that should work fine,

Re: [PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-30 Thread Sowmini Varadhan
On (12/30/16 18:39), Willem de Bruijn wrote: > > Variable length slots seems like the only one from that list that > makes sense on Tx. > > It is already possible to prepare multiple buffers before triggering > transmit, so the block-based signal moderation is not very relevant. FWIW, here is

Re: [PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-30 Thread Willem de Bruijn
>> Once we define the interface as equivalent to v2, we cannot redefine it to >> support v3-only features later. > > What v3 only features do we think we want to support? Variable length slots seems like the only one from that list that makes sense on Tx. It is already possible to prepare

Re: [PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-30 Thread Sowmini Varadhan
On (12/30/16 16:33), Willem de Bruijn wrote: > > Once we define the interface as equivalent to v2, we cannot redefine it to > support v3-only features later. What v3 only features do we think we want to support? Tpacket_v3 went in commit f6fb8f100b807378fda19e83e5ac6828b638603a : Date:

Re: [PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-30 Thread Willem de Bruijn
On Fri, Dec 30, 2016 at 11:54 AM, Sowmini Varadhan wrote: > Although TPACKET_V3 Rx has some benefits over TPACKET_V2 Rx, > *_v3 does not currently have Tx support. As a result an application > that wants the best perf for Tx and Rx (e.g. to handle > request/response

[PATCH net-next] af_packet: Provide a TPACKET_V2 compatible Tx path for TPACKET_V3

2016-12-30 Thread Sowmini Varadhan
Although TPACKET_V3 Rx has some benefits over TPACKET_V2 Rx, *_v3 does not currently have Tx support. As a result an application that wants the best perf for Tx and Rx (e.g. to handle request/response transacations) ends up needing 2 sockets, one with *_v2 for Tx and another with *_v3 for Rx.