From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski via iovisor-dev Subject: Re: XDP seeking input from NIC hardware vendors Date: Fri, 8 Jul 2016 14:44:53 +0100 Message-ID: <20160708144453.345b51e5@jkicinski-Precision-T1700> References: <20160707124245.6d95635a@redhat.com> <20160708022210.GA12244@ast-mbp.thefacebook.com> Reply-To: Jakub Kicinski Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "iovisor-dev-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy@public.gmane.org" , "Fastabend, John R" , Edward Cree , Simon Horman , Rana Shahout , Or Gerlitz , Ari Saha To: Alexei Starovoitov Return-path: In-Reply-To: <20160708022210.GA12244-+o4/htvd0TDFYCXBM6kdu7fOX0fSgVTm@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iovisor-dev-bounces-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy@public.gmane.org Errors-To: iovisor-dev-bounces-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy@public.gmane.org List-Id: netdev.vger.kernel.org On Thu, 7 Jul 2016 19:22:12 -0700, Alexei Starovoitov wrote: > > If the goal is to just separate XDP traffic from non-XDP traffic you could accomplish this with a combination of SR-IOV/macvlan to separate the device queues into multiple netdevs and then run XDP on just one of the netdevs. Then use flow director (ethtool) or 'tc cls_u32/flower' to steer traffic to the netdev. This is how we support multiple networking stacks on one device by the way it is called the bifurcated driver. Its not too far of a stretch to think we could offload some simple XDP programs to program the splitting of traffic instead of cls_u32/flower/flow_director and then you would have a stack of XDP programs. One running in hardware and a set running on the queues in software. > > the above sounds like much better approach then Jesper/mine prog_per_ring stuff. > If we can split the nic via sriov and have dedicated netdev via VF just for XDP that's way cleaner approach. > I guess we won't need to do xdp_rxqmask after all. +1 I was thinking about using eBPF to direct to NIC queues but concluded that doing a redirect to a VF is cleaner. Especially if the PF driver supports VF representatives we could potentially just use bpf_redirect(VFR netdev) and the VF doesn't even have to be handled by the same stack.