lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/1] XDP Program for Ip forward

First of all thank you for working on this.

On Tue, 3 Oct 2017 13:07:04 +0530 cjacob <Christina.Jacob@cavium.com> wrote:

> Usage: ./xdp3 [-S] <ifindex1...ifindexn>
>
> -S to choose generic xdp implementation
> [Default is driver xdp implementation]
> ifindex - the index of the interface to which
> the xdp program has to be attached.
> in 4.14-rc3 kernel.

I would prefer if we can name the program something more descriptive
than "xdp3". What about "xdp_redirect_router" or "xdp_router_ipv4" ?

I would also appreciate if we can stop using ifindex'es, and instead
use normal device ifname's. And simply do the lookup to the ifindex in
the program via if_nametoindex(ifname), see how in [1] and [2].

When adding more ifname's you can just use the same trick as with
multiple --cpu options like [1] and [2].

[1] http://lkml.kernel.org/r/150711864538.9499.11712573036995600273.stgit@firesoul
[2] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_redirect_cpu_user.c

--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer

\
 
 \ /
  Last update: 2017-10-04 17:08    [W:0.049 / U:6.808 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site