On Tue, Dec 24, 2019 at 03:36:07PM +0800, xia wrote:
> Hello, everyone. 
> I am trying to trace the code of packet processing. I read 
> 'netdev-provider.h', and learned that 'netdev' and 'netdev_rxq' are the most 
> important data structure for network devices.
> 
> 
> So I create an ovs bridge using "add-br" with default type. I found that ovs 
> create an 'internal' type 'netdev'.
> 
> 
> The construction of this 'internal' netdev invokes the funtion 
> 'netdev_linux_construct' in 'netdev-linux.c'. 
> 
> 
> I guess the 'internal' bridge will consequently invoke 
> 'netdev_linux_rxq_construct' to initialize the 'netdev_rxq'. However, it does 
> not. Functions, like 'netdev_linux_rxq_alloc', 'netdev_linux_rxq_construct', 
> are all passed.
> 
> 
> I want to snoop packets passing through receive queues of a network device, 
> for example, a bridge of Linux or the pmd-rxq of DPDK. I think I can hack the 
> 'netdev_rxq' to achieve this target. But I was wondering why the 'internal' 
> bridge does not initialize 'netdev_rxq'.
> 
> 
> Maybe the 'internal' bridge is just a Linux bridge in natural, and the kernel 
> is in charge of all the stuff. So ovs does not construct a 'netdev-rxq' for 
> 'internal' bridge.
> 
> 
> Thank you for sharing your ideas.

It sounds like you're using the Linux kernel datapath.  If so, then the
Linux kernel does all of the forwarding and the ovs-vswitchd userspace
never reads packets directly from the devices.

Userspace will read packets from the devices if you use the userspace
datapath.
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to