Re: [PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-12-01 Thread Willem de Bruijn
On Fri, Nov 30, 2018 at 7:41 PM Daniel Borkmann wrote: > > On 12/01/2018 12:42 AM, Willem de Bruijn wrote: > > On Fri, Nov 30, 2018 at 5:48 PM Song Liu wrote: > >> > >> On Fri, Nov 30, 2018 at 12:09 PM Willem de Bruijn > >> wrote: > >>> > >>> From: Petar Penkov > >>> > >>> The pkt_len field in

Re: [PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Daniel Borkmann
On 12/01/2018 12:42 AM, Willem de Bruijn wrote: > On Fri, Nov 30, 2018 at 5:48 PM Song Liu wrote: >> >> On Fri, Nov 30, 2018 at 12:09 PM Willem de Bruijn >> wrote: >>> >>> From: Petar Penkov >>> >>> The pkt_len field in qdisc_skb_cb stores the skb length as it will >>> appear on the wire after

Re: [PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Willem de Bruijn
On Fri, Nov 30, 2018 at 5:48 PM Song Liu wrote: > > On Fri, Nov 30, 2018 at 12:09 PM Willem de Bruijn > wrote: > > > > From: Petar Penkov > > > > The pkt_len field in qdisc_skb_cb stores the skb length as it will > > appear on the wire after segmentation. For byte accounting, this value > > is

Re: [PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Song Liu
On Fri, Nov 30, 2018 at 12:09 PM Willem de Bruijn wrote: > > From: Petar Penkov > > The pkt_len field in qdisc_skb_cb stores the skb length as it will > appear on the wire after segmentation. For byte accounting, this value > is more accurate than skb->len. It is computed on entry to the TC >

[PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Willem de Bruijn
From: Petar Penkov The pkt_len field in qdisc_skb_cb stores the skb length as it will appear on the wire after segmentation. For byte accounting, this value is more accurate than skb->len. It is computed on entry to the TC layer, so only valid there. Allow read access to this field from BPF tc