Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-25 Thread Willem de Bruijn
On Tue, Apr 25, 2017 at 9:56 AM, Miroslav Lichvar wrote: > On Mon, Apr 24, 2017 at 11:18:13AM -0400, Willem de Bruijn wrote: >> On Mon, Apr 24, 2017 at 5:00 AM, Miroslav Lichvar >> wrote: >> > Would "skb->data - skb->head - >> > skb->mac_header + skb->len" always work as the L2 length for receiv

Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-25 Thread Miroslav Lichvar
On Mon, Apr 24, 2017 at 11:18:13AM -0400, Willem de Bruijn wrote: > On Mon, Apr 24, 2017 at 5:00 AM, Miroslav Lichvar wrote: > > Would "skb->data - skb->head - > > skb->mac_header + skb->len" always work as the L2 length for received > > packets at the time when the cmsg is prepared? > > (skb->da

Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-24 Thread Willem de Bruijn
On Mon, Apr 24, 2017 at 5:00 AM, Miroslav Lichvar wrote: > On Thu, Apr 13, 2017 at 12:16:09PM -0400, Willem de Bruijn wrote: >> On Thu, Apr 13, 2017 at 11:18 AM, Miroslav Lichvar >> wrote: >> > On Thu, Apr 13, 2017 at 10:37:07AM -0400, Willem de Bruijn wrote: >> >> Why is this L2 length needed?

Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-24 Thread Miroslav Lichvar
On Thu, Apr 13, 2017 at 12:16:09PM -0400, Willem de Bruijn wrote: > On Thu, Apr 13, 2017 at 11:18 AM, Miroslav Lichvar > wrote: > > On Thu, Apr 13, 2017 at 10:37:07AM -0400, Willem de Bruijn wrote: > >> Why is this L2 length needed? > > > > It's needed for incoming packets to allow converting of

Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-13 Thread Willem de Bruijn
On Thu, Apr 13, 2017 at 11:18 AM, Miroslav Lichvar wrote: > On Thu, Apr 13, 2017 at 10:37:07AM -0400, Willem de Bruijn wrote: >> On Wed, Apr 12, 2017 at 10:17 AM, Miroslav Lichvar >> wrote: >> > Extend the skb_shared_hwtstamps structure with the index of the >> > real interface which received or

Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-13 Thread Miroslav Lichvar
On Thu, Apr 13, 2017 at 10:37:07AM -0400, Willem de Bruijn wrote: > On Wed, Apr 12, 2017 at 10:17 AM, Miroslav Lichvar > wrote: > > Extend the skb_shared_hwtstamps structure with the index of the > > real interface which received or transmitted the packet and the length > > of the packet at layer

Re: [RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-13 Thread Willem de Bruijn
On Wed, Apr 12, 2017 at 10:17 AM, Miroslav Lichvar wrote: > Extend the skb_shared_hwtstamps structure with the index of the > real interface which received or transmitted the packet and the length > of the packet at layer 2. The original packet is received along with the timestamp. Why is this L2

[RFC PATCH 3/7] net: add option to get information about timestamped packets

2017-04-12 Thread Miroslav Lichvar
Extend the skb_shared_hwtstamps structure with the index of the real interface which received or transmitted the packet and the length of the packet at layer 2. Add a SOF_TIMESTAMPING_OPT_PKTINFO flag to the SO_TIMESTAMPING option to allow applications to get this information as struct scm_ts_pktin