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

2018-12-03 Thread Daniel Borkmann
On 12/03/2018 02:18 AM, 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 > layer, so

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

2018-12-02 Thread Song Liu
On Sun, Dec 2, 2018 at 5:18 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 v2] bpf: allow BPF read access to qdisc pkt_len

2018-12-02 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