On Tue, Feb 5, 2019 at 12:58 PM Stanislav Fomichev <s...@google.com> wrote: > > Now that we have __flow_bpf_dissect which works on raw data (by > constructing temporary on-stack skb), use it when doing > BPF_PROG_TEST_RUN for flow dissector. > > This should help us catch any possible bugs due to missing shinfo on > the on-stack skb. > > Note that existing __skb_flow_bpf_dissect swallows L2 headers and returns > nhoff=0, we need to preserve the existing behavior. > > Signed-off-by: Stanislav Fomichev <s...@google.com> > --- > net/bpf/test_run.c | 52 +++++++++++++++------------------------------- > 1 file changed, 17 insertions(+), 35 deletions(-) >
> ret = bpf_test_finish(kattr, uattr, &flow_keys, sizeof(flow_keys), > retval, duration); > - > - kfree_skb(skb); > - kfree(sk); > + kfree(data); > return ret; > + nit: unnecessary whitespace line > }