All of lore.kernel.org
 help / color / mirror / Atom feed
* veth interface and native XDP
@ 2018-08-12  7:18 Manohar Kumar
  2018-08-13  5:51 ` Chang-an Song
  0 siblings, 1 reply; 6+ messages in thread
From: Manohar Kumar @ 2018-08-12  7:18 UTC (permalink / raw)
  To: xdp-newbies

Hello,

I am trying out XDP using the example
https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/test_xdp_redirect.sh

To set the xdp program instead of using xdpgeneric I did

ip link set dev veth1 xdp obj test_xdp_redirect.o sec redirect_to_222

My kernel version is 4.15.0 which I think has native XDP support for
veth. But from the ip link ouptut it looks like the generic XDP is
being used and not the native XDP for veth.

What is the right way to make use of the native XDP for veth ?

root@ubuntu-G551JW:~# ip link show dev veth1
111: veth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric
qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether c2:ff:f4:d9:15:8f brd ff:ff:ff:ff:ff:ff link-netnsid 0
    prog/xdp id 32 tag d92aa6f7de3bd7d0 jited
root@ubuntu-G551JW:~#

Thanks for the help.

-Kumar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: veth interface and native XDP
  2018-08-12  7:18 veth interface and native XDP Manohar Kumar
@ 2018-08-13  5:51 ` Chang-an Song
  2018-08-13  7:10   ` Daniel Borkmann
  0 siblings, 1 reply; 6+ messages in thread
From: Chang-an Song @ 2018-08-13  5:51 UTC (permalink / raw)
  To: forwardinglnx; +Cc: xdp-newbies

Hello Manohar

I also tried the same test, and the following error message came out.
If possible,
Could you let me know where did you find native XDP support for the
veth interface in 4.15 kernel?

# ip -force link set dev veth1 xdpdrv obj test_xdp_redirect.o sec
redirect_to_222
RTNETLINK answers: Operation not supported

# uname -a
Linux xdptest 4.17.0-rc7+ #4 SMP Mon Aug 13 13:41:24 KST 2018 x86_64
x86_64 x86_64 GNU/Linux


This is the native XDP list I know as below,
- Mellanox: mlx4 (v4.10) + mlx5 (v4.9)
- Netronome: nfp (v4.10)
- Virtio-net (v4.10)
- Cavium/Qlogic: qede (v4.10)
- Cavium: thunder/nicvf (v4.12)
- Broadcom: bnxt (v4.12)
- Intel: ixgbe (v4.12) + i40e (net-next)

If I am incorrect information, please tell me, again.

BR/Leo

On Sun, Aug 12, 2018 at 4:22 PM Manohar Kumar <forwardinglnx@gmail.com> wrote:
>
> Hello,
>
> I am trying out XDP using the example
> https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/test_xdp_redirect.sh
>
> To set the xdp program instead of using xdpgeneric I did
>
> ip link set dev veth1 xdp obj test_xdp_redirect.o sec redirect_to_222
>
> My kernel version is 4.15.0 which I think has native XDP support for
> veth. But from the ip link ouptut it looks like the generic XDP is
> being used and not the native XDP for veth.
>
> What is the right way to make use of the native XDP for veth ?
>
> root@ubuntu-G551JW:~# ip link show dev veth1
> 111: veth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric
> qdisc noqueue state UP mode DEFAULT group default qlen 1000
>     link/ether c2:ff:f4:d9:15:8f brd ff:ff:ff:ff:ff:ff link-netnsid 0
>     prog/xdp id 32 tag d92aa6f7de3bd7d0 jited
> root@ubuntu-G551JW:~#
>
> Thanks for the help.
>
> -Kumar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: veth interface and native XDP
  2018-08-13  5:51 ` Chang-an Song
@ 2018-08-13  7:10   ` Daniel Borkmann
  2018-08-13  7:13     ` Daniel Borkmann
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Borkmann @ 2018-08-13  7:10 UTC (permalink / raw)
  To: Chang-an Song, forwardinglnx; +Cc: xdp-newbies

Hi Manohar, hi Leo,

On 08/13/2018 07:51 AM, Chang-an Song wrote:
> Hello Manohar
> 
> I also tried the same test, and the following error message came out.
> If possible,
> Could you let me know where did you find native XDP support for the
> veth interface in 4.15 kernel?

The 4.15 kernel does not have native XDP support in the kernel, so
only generic XDP would work for veth. Native XDP for veth is scheduled
for 4.19 kernel. You can test it out from bpf-next kernel tree here:

git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

> # ip -force link set dev veth1 xdpdrv obj test_xdp_redirect.o sec
> redirect_to_222
> RTNETLINK answers: Operation not supported
> 
> # uname -a
> Linux xdptest 4.17.0-rc7+ #4 SMP Mon Aug 13 13:41:24 KST 2018 x86_64
> x86_64 x86_64 GNU/Linux
> 
> 
> This is the native XDP list I know as below,
> - Mellanox: mlx4 (v4.10) + mlx5 (v4.9)
> - Netronome: nfp (v4.10)
> - Virtio-net (v4.10)
> - Cavium/Qlogic: qede (v4.10)
> - Cavium: thunder/nicvf (v4.12)
> - Broadcom: bnxt (v4.12)
> - Intel: ixgbe (v4.12) + i40e (net-next)

There are a couple missing, for full list please see:

  http://cilium.readthedocs.io/en/latest/bpf/#xdp

Thanks,
Daniel

> If I am incorrect information, please tell me, again.
> 
> BR/Leo
> 
> On Sun, Aug 12, 2018 at 4:22 PM Manohar Kumar <forwardinglnx@gmail.com> wrote:
>>
>> Hello,
>>
>> I am trying out XDP using the example
>> https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/test_xdp_redirect.sh
>>
>> To set the xdp program instead of using xdpgeneric I did
>>
>> ip link set dev veth1 xdp obj test_xdp_redirect.o sec redirect_to_222
>>
>> My kernel version is 4.15.0 which I think has native XDP support for
>> veth. But from the ip link ouptut it looks like the generic XDP is
>> being used and not the native XDP for veth.
>>
>> What is the right way to make use of the native XDP for veth ?
>>
>> root@ubuntu-G551JW:~# ip link show dev veth1
>> 111: veth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric
>> qdisc noqueue state UP mode DEFAULT group default qlen 1000
>>     link/ether c2:ff:f4:d9:15:8f brd ff:ff:ff:ff:ff:ff link-netnsid 0
>>     prog/xdp id 32 tag d92aa6f7de3bd7d0 jited
>> root@ubuntu-G551JW:~#
>>
>> Thanks for the help.
>>
>> -Kumar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: veth interface and native XDP
  2018-08-13  7:10   ` Daniel Borkmann
@ 2018-08-13  7:13     ` Daniel Borkmann
  2018-08-13  7:48       ` Chang-an Song
  2018-08-13 14:13       ` Manohar Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Borkmann @ 2018-08-13  7:13 UTC (permalink / raw)
  To: Chang-an Song, forwardinglnx; +Cc: xdp-newbies

On 08/13/2018 09:10 AM, Daniel Borkmann wrote:
> Hi Manohar, hi Leo,
> 
> On 08/13/2018 07:51 AM, Chang-an Song wrote:
>> Hello Manohar
>>
>> I also tried the same test, and the following error message came out.
>> If possible,
>> Could you let me know where did you find native XDP support for the
>> veth interface in 4.15 kernel?
> 
> The 4.15 kernel does not have native XDP support in the kernel, so

(Just to be clear, for veth specifically I mean here.)

> only generic XDP would work for veth. Native XDP for veth is scheduled
> for 4.19 kernel. You can test it out from bpf-next kernel tree here:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Related merge commit for reference:

https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=60afdf066a35317efd5d1d7ae7c7f4ef2b32601f

>> # ip -force link set dev veth1 xdpdrv obj test_xdp_redirect.o sec
>> redirect_to_222
>> RTNETLINK answers: Operation not supported
>>
>> # uname -a
>> Linux xdptest 4.17.0-rc7+ #4 SMP Mon Aug 13 13:41:24 KST 2018 x86_64
>> x86_64 x86_64 GNU/Linux
>>
>>
>> This is the native XDP list I know as below,
>> - Mellanox: mlx4 (v4.10) + mlx5 (v4.9)
>> - Netronome: nfp (v4.10)
>> - Virtio-net (v4.10)
>> - Cavium/Qlogic: qede (v4.10)
>> - Cavium: thunder/nicvf (v4.12)
>> - Broadcom: bnxt (v4.12)
>> - Intel: ixgbe (v4.12) + i40e (net-next)
> 
> There are a couple missing, for full list please see:
> 
>   http://cilium.readthedocs.io/en/latest/bpf/#xdp
> 
> Thanks,
> Daniel
> 
>> If I am incorrect information, please tell me, again.
>>
>> BR/Leo
>>
>> On Sun, Aug 12, 2018 at 4:22 PM Manohar Kumar <forwardinglnx@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I am trying out XDP using the example
>>> https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/test_xdp_redirect.sh
>>>
>>> To set the xdp program instead of using xdpgeneric I did
>>>
>>> ip link set dev veth1 xdp obj test_xdp_redirect.o sec redirect_to_222
>>>
>>> My kernel version is 4.15.0 which I think has native XDP support for
>>> veth. But from the ip link ouptut it looks like the generic XDP is
>>> being used and not the native XDP for veth.
>>>
>>> What is the right way to make use of the native XDP for veth ?
>>>
>>> root@ubuntu-G551JW:~# ip link show dev veth1
>>> 111: veth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric
>>> qdisc noqueue state UP mode DEFAULT group default qlen 1000
>>>     link/ether c2:ff:f4:d9:15:8f brd ff:ff:ff:ff:ff:ff link-netnsid 0
>>>     prog/xdp id 32 tag d92aa6f7de3bd7d0 jited
>>> root@ubuntu-G551JW:~#
>>>
>>> Thanks for the help.
>>>
>>> -Kumar
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: veth interface and native XDP
  2018-08-13  7:13     ` Daniel Borkmann
@ 2018-08-13  7:48       ` Chang-an Song
  2018-08-13 14:13       ` Manohar Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Chang-an Song @ 2018-08-13  7:48 UTC (permalink / raw)
  To: daniel; +Cc: Manohar Kumar, xdp-newbies

Hello Danial

>The 4.15 kernel does not have native XDP support in the kernel, so
>only generic XDP would work for veth. Native XDP for veth is scheduled
>for 4.19 kernel. You can test it out from bpf-next kernel tree here:

>git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
>Related merge commit for reference:

>https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=60afdf066a35317efd5d1d7ae7c7f4ef2b32601f

Thank you very much for sharing information, :-)
I fully agree.

BR/Leo
On Mon, Aug 13, 2018 at 4:13 PM Daniel Borkmann <daniel@iogearbox.net> wrote:
>
> On 08/13/2018 09:10 AM, Daniel Borkmann wrote:
> > Hi Manohar, hi Leo,
> >
> > On 08/13/2018 07:51 AM, Chang-an Song wrote:
> >> Hello Manohar
> >>
> >> I also tried the same test, and the following error message came out.
> >> If possible,
> >> Could you let me know where did you find native XDP support for the
> >> veth interface in 4.15 kernel?
> >
> > The 4.15 kernel does not have native XDP support in the kernel, so
>
> (Just to be clear, for veth specifically I mean here.)
>
> > only generic XDP would work for veth. Native XDP for veth is scheduled
> > for 4.19 kernel. You can test it out from bpf-next kernel tree here:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
>
> Related merge commit for reference:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=60afdf066a35317efd5d1d7ae7c7f4ef2b32601f
>
> >> # ip -force link set dev veth1 xdpdrv obj test_xdp_redirect.o sec
> >> redirect_to_222
> >> RTNETLINK answers: Operation not supported
> >>
> >> # uname -a
> >> Linux xdptest 4.17.0-rc7+ #4 SMP Mon Aug 13 13:41:24 KST 2018 x86_64
> >> x86_64 x86_64 GNU/Linux
> >>
> >>
> >> This is the native XDP list I know as below,
> >> - Mellanox: mlx4 (v4.10) + mlx5 (v4.9)
> >> - Netronome: nfp (v4.10)
> >> - Virtio-net (v4.10)
> >> - Cavium/Qlogic: qede (v4.10)
> >> - Cavium: thunder/nicvf (v4.12)
> >> - Broadcom: bnxt (v4.12)
> >> - Intel: ixgbe (v4.12) + i40e (net-next)
> >
> > There are a couple missing, for full list please see:
> >
> >   http://cilium.readthedocs.io/en/latest/bpf/#xdp
> >
> > Thanks,
> > Daniel
> >
> >> If I am incorrect information, please tell me, again.
> >>
> >> BR/Leo
> >>
> >> On Sun, Aug 12, 2018 at 4:22 PM Manohar Kumar <forwardinglnx@gmail.com> wrote:
> >>>
> >>> Hello,
> >>>
> >>> I am trying out XDP using the example
> >>> https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/test_xdp_redirect.sh
> >>>
> >>> To set the xdp program instead of using xdpgeneric I did
> >>>
> >>> ip link set dev veth1 xdp obj test_xdp_redirect.o sec redirect_to_222
> >>>
> >>> My kernel version is 4.15.0 which I think has native XDP support for
> >>> veth. But from the ip link ouptut it looks like the generic XDP is
> >>> being used and not the native XDP for veth.
> >>>
> >>> What is the right way to make use of the native XDP for veth ?
> >>>
> >>> root@ubuntu-G551JW:~# ip link show dev veth1
> >>> 111: veth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric
> >>> qdisc noqueue state UP mode DEFAULT group default qlen 1000
> >>>     link/ether c2:ff:f4:d9:15:8f brd ff:ff:ff:ff:ff:ff link-netnsid 0
> >>>     prog/xdp id 32 tag d92aa6f7de3bd7d0 jited
> >>> root@ubuntu-G551JW:~#
> >>>
> >>> Thanks for the help.
> >>>
> >>> -Kumar
> >
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: veth interface and native XDP
  2018-08-13  7:13     ` Daniel Borkmann
  2018-08-13  7:48       ` Chang-an Song
@ 2018-08-13 14:13       ` Manohar Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Manohar Kumar @ 2018-08-13 14:13 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: Chang-an Song, xdp-newbies

Thanks, Daniel and Leo, for the clarification. Also, good to know that
there is a -force option for the ip link command.

In one of the presentations online I saw that xdp support for veth &
tap were added in 4.14 which is clearly incorrect.

thanks,
- Manohar

On Mon, Aug 13, 2018 at 12:13 AM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> On 08/13/2018 09:10 AM, Daniel Borkmann wrote:
>> Hi Manohar, hi Leo,
>>
>> On 08/13/2018 07:51 AM, Chang-an Song wrote:
>>> Hello Manohar
>>>
>>> I also tried the same test, and the following error message came out.
>>> If possible,
>>> Could you let me know where did you find native XDP support for the
>>> veth interface in 4.15 kernel?
>>
>> The 4.15 kernel does not have native XDP support in the kernel, so
>
> (Just to be clear, for veth specifically I mean here.)
>
>> only generic XDP would work for veth. Native XDP for veth is scheduled
>> for 4.19 kernel. You can test it out from bpf-next kernel tree here:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
>
> Related merge commit for reference:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=60afdf066a35317efd5d1d7ae7c7f4ef2b32601f
>
>>> # ip -force link set dev veth1 xdpdrv obj test_xdp_redirect.o sec
>>> redirect_to_222
>>> RTNETLINK answers: Operation not supported
>>>
>>> # uname -a
>>> Linux xdptest 4.17.0-rc7+ #4 SMP Mon Aug 13 13:41:24 KST 2018 x86_64
>>> x86_64 x86_64 GNU/Linux
>>>
>>>
>>> This is the native XDP list I know as below,
>>> - Mellanox: mlx4 (v4.10) + mlx5 (v4.9)
>>> - Netronome: nfp (v4.10)
>>> - Virtio-net (v4.10)
>>> - Cavium/Qlogic: qede (v4.10)
>>> - Cavium: thunder/nicvf (v4.12)
>>> - Broadcom: bnxt (v4.12)
>>> - Intel: ixgbe (v4.12) + i40e (net-next)
>>
>> There are a couple missing, for full list please see:
>>
>>   http://cilium.readthedocs.io/en/latest/bpf/#xdp
>>
>> Thanks,
>> Daniel
>>
>>> If I am incorrect information, please tell me, again.
>>>
>>> BR/Leo
>>>
>>> On Sun, Aug 12, 2018 at 4:22 PM Manohar Kumar <forwardinglnx@gmail.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I am trying out XDP using the example
>>>> https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/test_xdp_redirect.sh
>>>>
>>>> To set the xdp program instead of using xdpgeneric I did
>>>>
>>>> ip link set dev veth1 xdp obj test_xdp_redirect.o sec redirect_to_222
>>>>
>>>> My kernel version is 4.15.0 which I think has native XDP support for
>>>> veth. But from the ip link ouptut it looks like the generic XDP is
>>>> being used and not the native XDP for veth.
>>>>
>>>> What is the right way to make use of the native XDP for veth ?
>>>>
>>>> root@ubuntu-G551JW:~# ip link show dev veth1
>>>> 111: veth1@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric
>>>> qdisc noqueue state UP mode DEFAULT group default qlen 1000
>>>>     link/ether c2:ff:f4:d9:15:8f brd ff:ff:ff:ff:ff:ff link-netnsid 0
>>>>     prog/xdp id 32 tag d92aa6f7de3bd7d0 jited
>>>> root@ubuntu-G551JW:~#
>>>>
>>>> Thanks for the help.
>>>>
>>>> -Kumar
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-13 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-12  7:18 veth interface and native XDP Manohar Kumar
2018-08-13  5:51 ` Chang-an Song
2018-08-13  7:10   ` Daniel Borkmann
2018-08-13  7:13     ` Daniel Borkmann
2018-08-13  7:48       ` Chang-an Song
2018-08-13 14:13       ` Manohar Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.