summaryrefslogtreecommitdiffstats
path: root/Documentation/netlink/specs/netdev.yaml
blob: 14511b13f305dc24617fa95ebfbcf1ce0c286cdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)

name: netdev

doc:
  netdev configuration over generic netlink.

definitions:
  -
    type: flags
    name: xdp-act
    render-max: true
    entries:
      -
        name: basic
        doc:
          XDP features 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:
         This feature informs if netdev supports XDP hw offloading.
      -
        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.
  -
    type: flags
    name: xdp-rx-metadata
    render-max: true
    entries:
      -
        name: timestamp
        doc:
          Device is capable of exposing receive HW timestamp via bpf_xdp_metadata_rx_timestamp().
      -
        name: hash
        doc:
          Device is capable of exposing receive packet hash via bpf_xdp_metadata_rx_hash().

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
      -
        name: xdp-zc-max-segs
        doc: max fragment count supported by ZC driver
        type: u32
        checks:
          min: 1
      -
        name: xdp-rx-metadata-features
        doc: Bitmask of supported XDP receive metadata features.
             See Documentation/networking/xdp-rx-metadata.rst for more details.
        type: u64
        enum: xdp-rx-metadata

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
            - xdp-zc-max-segs
            - xdp-rx-metadata-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