Re: [PATCH bpf-next] xsk: support AF_PACKET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 28, 2021 at 11:25:56AM +0200, Toke Høiland-Jørgensen wrote:
> Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> writes:
> 
> > On Fri, 28 May 2021 10:55:58 +0200, Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote:
> >> Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> writes:
> >>
> >> > In xsk mode, users cannot use AF_PACKET(tcpdump) to observe the current
> >> > rx/tx data packets. This feature is very important in many cases. So
> >> > this patch allows AF_PACKET to obtain xsk packages.
> >>
> >> You can use xdpdump to dump the packets from the XDP program before it
> >> gets redirected into the XSK:
> >> https://github.com/xdp-project/xdp-tools/tree/master/xdp-dump
> >
> > Wow, this is a good idea.
> >
> >>
> >> Doens't currently work on egress, but if/when we get a proper TX hook
> >> that should be doable as well.
> >>
> >> Wiring up XSK to AF_PACKET sounds a bit nonsensical: XSK is already a
> >> transport to userspace, why would you need a second one?
> >
> > I have some different ideas. In my opinion, just like AF_PACKET can monitor
> > tcp/udp packets, AF_PACKET monitors xsk packets is the same.
> 
> But you're adding code in the fast path to do this, in a code path where
> others have been working quite hard to squeeze out every drop of
> performance (literally chasing single nanoseconds). So I'm sorry, but
> this approach is just not going to fly.

+1. Probably would be better for everyone if Xuan started a thread on list
what is his need.

> 
> What is your use case anyway? Yes, being able to run tcpdump and see the
> packets is nice and convenient, but what do you actually want to use
> this for? Just for debugging your application? System monitoring?
> Something else?
> 
> -Toke
> 



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux