2023-03-15 16:03:50 -07:00
|
|
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
2023-03-06 12:04:57 -08:00
|
|
|
|
netdev-genl: create a simple family for netdev stuff
Add a Netlink spec-compatible family for netdevs.
This is a very simple implementation without much
thought going into it.
It allows us to reap all the benefits of Netlink specs,
one can use the generic client to issue the commands:
$ ./cli.py --spec netdev.yaml --dump dev_get
[{'ifindex': 1, 'xdp-features': set()},
{'ifindex': 2, 'xdp-features': {'basic', 'ndo-xmit', 'redirect'}},
{'ifindex': 3, 'xdp-features': {'rx-sg'}}]
the generic python library does not have flags-by-name
support, yet, but we also don't have to carry strings
in the messages, as user space can get the names from
the spec.
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Co-developed-by: Marek Majtyka <alardam@gmail.com>
Signed-off-by: Marek Majtyka <alardam@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/327ad9c9868becbe1e601b580c962549c8cd81f2.1675245258.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-02-01 11:24:17 +01:00
|
|
|
name: netdev
|
|
|
|
|
|
|
|
doc:
|
|
|
|
netdev configuration over generic netlink.
|
|
|
|
|
|
|
|
definitions:
|
|
|
|
-
|
|
|
|
type: flags
|
|
|
|
name: xdp-act
|
2023-03-09 13:25:27 +01:00
|
|
|
render-max: true
|
netdev-genl: create a simple family for netdev stuff
Add a Netlink spec-compatible family for netdevs.
This is a very simple implementation without much
thought going into it.
It allows us to reap all the benefits of Netlink specs,
one can use the generic client to issue the commands:
$ ./cli.py --spec netdev.yaml --dump dev_get
[{'ifindex': 1, 'xdp-features': set()},
{'ifindex': 2, 'xdp-features': {'basic', 'ndo-xmit', 'redirect'}},
{'ifindex': 3, 'xdp-features': {'rx-sg'}}]
the generic python library does not have flags-by-name
support, yet, but we also don't have to carry strings
in the messages, as user space can get the names from
the spec.
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Co-developed-by: Marek Majtyka <alardam@gmail.com>
Signed-off-by: Marek Majtyka <alardam@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/327ad9c9868becbe1e601b580c962549c8cd81f2.1675245258.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-02-01 11:24:17 +01:00
|
|
|
entries:
|
|
|
|
-
|
|
|
|
name: basic
|
|
|
|
doc:
|
|
|
|
XDP feautues set supported by all drivers
|
|
|
|
(XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX)
|
|
|
|
-
|
|
|
|
name: redirect
|
|
|
|
doc:
|
|
|
|
The netdev supports XDP_REDIRECT
|
|
|
|
-
|
|
|
|
name: ndo-xmit
|
|
|
|
doc:
|
|
|
|
This feature informs if netdev implements ndo_xdp_xmit callback.
|
|
|
|
-
|
|
|
|
name: xsk-zerocopy
|
|
|
|
doc:
|
|
|
|
This feature informs if netdev supports AF_XDP in zero copy mode.
|
|
|
|
-
|
|
|
|
name: hw-offload
|
|
|
|
doc:
|
2023-02-23 09:26:56 +02:00
|
|
|
This feature informs if netdev supports XDP hw offloading.
|
netdev-genl: create a simple family for netdev stuff
Add a Netlink spec-compatible family for netdevs.
This is a very simple implementation without much
thought going into it.
It allows us to reap all the benefits of Netlink specs,
one can use the generic client to issue the commands:
$ ./cli.py --spec netdev.yaml --dump dev_get
[{'ifindex': 1, 'xdp-features': set()},
{'ifindex': 2, 'xdp-features': {'basic', 'ndo-xmit', 'redirect'}},
{'ifindex': 3, 'xdp-features': {'rx-sg'}}]
the generic python library does not have flags-by-name
support, yet, but we also don't have to carry strings
in the messages, as user space can get the names from
the spec.
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Co-developed-by: Marek Majtyka <alardam@gmail.com>
Signed-off-by: Marek Majtyka <alardam@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/327ad9c9868becbe1e601b580c962549c8cd81f2.1675245258.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-02-01 11:24:17 +01:00
|
|
|
-
|
|
|
|
name: rx-sg
|
|
|
|
doc:
|
|
|
|
This feature informs if netdev implements non-linear XDP buffer
|
|
|
|
support in the driver napi callback.
|
|
|
|
-
|
|
|
|
name: ndo-xmit-sg
|
|
|
|
doc:
|
|
|
|
This feature informs if netdev implements non-linear XDP buffer
|
|
|
|
support in ndo_xdp_xmit callback.
|
|
|
|
|
|
|
|
attribute-sets:
|
|
|
|
-
|
|
|
|
name: dev
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: ifindex
|
|
|
|
doc: netdev ifindex
|
|
|
|
type: u32
|
|
|
|
checks:
|
|
|
|
min: 1
|
|
|
|
-
|
|
|
|
name: pad
|
|
|
|
type: pad
|
|
|
|
-
|
|
|
|
name: xdp-features
|
|
|
|
doc: Bitmask of enabled xdp-features.
|
|
|
|
type: u64
|
|
|
|
enum: xdp-act
|
|
|
|
enum-as-flags: true
|
|
|
|
|
|
|
|
operations:
|
|
|
|
list:
|
|
|
|
-
|
|
|
|
name: dev-get
|
|
|
|
doc: Get / dump information about a netdev.
|
|
|
|
attribute-set: dev
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- ifindex
|
|
|
|
reply: &dev-all
|
|
|
|
attributes:
|
|
|
|
- ifindex
|
|
|
|
- xdp-features
|
|
|
|
dump:
|
|
|
|
reply: *dev-all
|
|
|
|
-
|
|
|
|
name: dev-add-ntf
|
|
|
|
doc: Notification about device appearing.
|
|
|
|
notify: dev-get
|
|
|
|
mcgrp: mgmt
|
|
|
|
-
|
|
|
|
name: dev-del-ntf
|
|
|
|
doc: Notification about device disappearing.
|
|
|
|
notify: dev-get
|
|
|
|
mcgrp: mgmt
|
|
|
|
-
|
|
|
|
name: dev-change-ntf
|
|
|
|
doc: Notification about device configuration being changed.
|
|
|
|
notify: dev-get
|
|
|
|
mcgrp: mgmt
|
|
|
|
|
|
|
|
mcast-groups:
|
|
|
|
list:
|
|
|
|
-
|
|
|
|
name: mgmt
|