On Mon, Dec 16, 2019 at 9:47 AM Ilya Maximets <i.maxim...@ovn.org> wrote: > > On 16.12.2019 18:23, William Tu wrote: > > On Mon, Dec 16, 2019 at 7:27 AM Ilya Maximets <i.maxim...@ovn.org> wrote: > >> > >> On 16.12.2019 15:27, William Tu wrote: > >>> On Mon, Dec 16, 2019 at 5:57 AM Ilya Maximets <i.maxim...@ovn.org> wrote: > >>>> > >>>> On 16.12.2019 14:43, William Tu wrote: > >>>>> On Mon, Dec 16, 2019 at 1:41 AM Ilya Maximets <i.maxim...@ovn.org> > >>>>> wrote: > >>>>>> > >>>>>> On 13.12.2019 21:59, William Tu wrote: > >>>>>>> Debugging netdev-afxdp is hard because tcpdump does not work > >>>>>>> at all, even for generic mode. ovs-tcpdump which uses port > >>>>>>> mirroring also does not work for netdev-afxdp. > >>>>>> > >>>>>> Hmm. Why ovs-tcpdump doesn't work for you? It should not depend > >>>>>> on port type. If it doesn't work we need to investigate this > >>>>>> case and fix it because it's a very important tool. > >>>>> > >>>>> Because ovs-tcpdump still uses 'tcpdump' tool to capture packets, > >>>>> (dump-cmd=tcpdump) and forward to mirror port. Since tcpdump > >>>>> sees no packet at all when type=afxdp, there is no packets to mirror. > >>>> > >>>> ovs-tcpdump creates simple tap interface and mirrors all the traffic > >>>> to it. tcpdump command is started on that tap interface (no xdp here). > >>>> There is no difference from which port types you're mirroring the > >>>> traffic. > >>>> It works for DPDK based ports and should work for afxdp. > >>> > >>> I got it working using ovs-tcpdump now, thanks! > >>> ex: ovs-tcpdump -i afxdp-p0 -n -l -w /tmp/p0.pcap > >> > >> OK. So, this patch is not needed. > > > > I think this patch is still useful, because using 'options:pcap' > > is much easier than ovs-tcpdump (which requires python libs, > > creates tap, etc). > > Another use case is for testsuite, we can compare the packet > > content by dumpling the pcap file. > > > > But this patch might have performance impact even > > when not enabling it? > > Yes, it will have performance impact since you're calling it from > the hot path. > > Also, current version will not work correctly. clang build fails. > (your travis link in commit-message is not correct). > To implement the functionality properly you need to protect pcap > streams by rcu.
Thanks, I paste the wrong link The error was here: https://travis-ci.org/williamtu/ovs-travis/builds/624759289 > > I don't think that it's hard to use ovs-tcpdump. Not harder than > usual tcpdump. All the additional ports and mirroring are created > and configured automatically. > > Best regards, Ilya Maximets. OK, make sense. I will use ovs-tcpdump. William _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev