> > P.S. Did not worth its own patch, but since you are working on it can you 
> > also
> > do s/sizeof(struct rte_mbuf)/RTE_MBUF_DEFAULT_BUF_SIZE/g ? I overlooked it 
> > last
> > time.
> 
> 
> Where is that bit?

This in app/test/test_bpf.c is a mix of two worlds:

```c
        const struct rte_bpf_prm prm = {
                .prog_arg = {
                        .type = RTE_BPF_ARG_PTR,
                        .size = sizeof(struct rte_mbuf),
                },
        };
```

The pointer points to the mbuf buffer, but the size is provided for the mbuf 
struct.

Now that I think of it, what lib/bpf/bpf_pkt.c passes to BPF program is not a 
pointer to the mbuf buffer, but a pointer to the packet data which is bigger by 
RTE_PKTMBUF_HEADROOM, so we should probably specify RTE_MBUF_DEFAULT_DATAROOM 
in the size member for our case.

Reply via email to