Commit Graph

157 Commits

Author SHA1 Message Date
Petr Oros 0786dfffa1 dpll: add clock quality level attribute and op
JIRA: https://issues.redhat.com/browse/RHEL-77838

Upstream commit(s):
commit a1afb959add1fad43cb337448c244ed70bac3109
Author: Jiri Pirko <jiri@nvidia.com>
Date:   Wed Oct 30 09:11:56 2024 +0100

    dpll: add clock quality level attribute and op

    In order to allow driver expose quality level of the clock it is
    running, introduce a new netlink attr with enum to carry it to the
    userspace. Also, introduce an op the dpll netlink code calls into the
    driver to obtain the value.

    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Link: https://patch.msgid.link/20241030081157.966604-2-jiri@resnulli.us
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2025-02-21 14:10:20 +01:00
Petr Oros 5f20ae2876 netlink: specs: mptcp: fix port endianness
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 09a45a5553792bbf20beba0a1ac90b4692324d06
Author: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Date:   Wed Sep 11 09:10:02 2024 +0000

    netlink: specs: mptcp: fix port endianness

    The MPTCP port attribute is in host endianness, but was documented
    as big-endian in the ynl specification.

    Below are two examples from net/mptcp/pm_netlink.c showing that the
    attribute is converted to/from host endianness for use with netlink.

    Import from netlink:
      addr->port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]))

    Export to netlink:
      nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_PORT, ntohs(addr->port))

    Where addr->port is defined as __be16.

    No functional change intended.

    Fixes: bc8aeb2045e2 ("Documentation: netlink: add a YAML spec for mptcp")
    Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
    Reviewed-by: Davide Caratti <dcaratti@redhat.com>
    Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20240911091003.1112179-1-ast@fiberby.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:56 +01:00
Petr Oros 26ad96c908 netlink: specs: nftables: allow decode of tailscale ruleset
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit e10034e38e9da2a644f2aa73f2f46bb7beb8620b
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Wed Sep 4 10:10:24 2024 +0100

    netlink: specs: nftables: allow decode of tailscale ruleset

    Fill another small gap in the nftables spec so that it is possible to
    dump a tailscale ruleset with:

      tools/net/ynl/cli.py --spec \
         Documentation/netlink/specs/nftables.yaml --dump getrule

    This adds support for the 'target' expression.

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://patch.msgid.link/20240904091024.3138-1-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:56 +01:00
Petr Oros 9860928768 netlink: specs: nftables: allow decode of default firewalld ruleset
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit d2088ca85ebc38c3e8783442ba2c0f3e5100ac6d
Author: Florian Westphal <fw@strlen.de>
Date:   Mon Sep 2 23:41:06 2024 +0200

    netlink: specs: nftables: allow decode of default firewalld ruleset

    This update allows listing default firewalld ruleset on Fedora 40 via
      tools/net/ynl/cli.py --spec \
         Documentation/netlink/specs/nftables.yaml --dump getrule

    Default ruleset uses fib, reject and objref expressions which were
    missing.

    Other missing expressions can be added later.

    Improve decoding while at it:
    - add bitwise, ct and lookup attributes
    - wire up the quota expression
    - translate raw verdict codes to a human reable name, e.g.
      'code': 4294967293 becomes 'code': 'jump'.

    v2: forgot fib addrtype in enum list (Donald Hunter)

    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Link: https://patch.msgid.link/20240902214112.2549-1-fw@strlen.de
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:56 +01:00
Petr Oros b533ec6993 doc/netlink/specs: add netkit support to rt_link.yaml
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 7d70ed9f9c6a9537379ff645d6befea4c203aa98
Author: Nikolay Aleksandrov <razor@blackwall.org>
Date:   Tue Aug 6 13:45:31 2024 +0300

    doc/netlink/specs: add netkit support to rt_link.yaml

    Add netkit support to rt_link.yaml. Only forward(PASS) and
    blackhole(DROP) policies are allowed to be set by user-space so I've
    added only them to the yaml to avoid confusion.

    Example:
      $ ./tools/net/ynl/cli.py \
         --spec Documentation/netlink/specs/rt_link.yaml \
         --do getlink --json '{"ifname": "netkit0"}' --output-json | jq
      ...
      "linkinfo": {
        "kind": "netkit",
        "data": {
          "primary": 1,
          "policy": "blackhole",
          "mode": "l2",
          "peer-policy": "forward"
        }
      },
      ...

    Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
    Link: https://patch.msgid.link/20240806104531.3296718-1-razor@blackwall.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:55 +01:00
Petr Oros 78ebb2a415 tcp_metrics: add netlink protocol spec in YAML
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 85674625e0bc25be4dbaa165a556ef6037328379
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Thu Jun 27 14:35:51 2024 -0700

    tcp_metrics: add netlink protocol spec in YAML

    Add a protocol spec for tcp_metrics, so that it's accessible via YNL.
    Useful at the very least for testing fixes.

    In this episode of "10,000 ways to complicate netlink" the metric
    nest has defines which are off by 1. iproute2 does:

            struct rtattr *m[TCP_METRIC_MAX + 1 + 1];

            parse_rtattr_nested(m, TCP_METRIC_MAX + 1, a);

            for (i = 0; i < TCP_METRIC_MAX + 1; i++) {
                    // ...
                    attr = m[i + 1];

    This is too weird to support in YNL, add a new set of defines
    with _correct_ values to the official kernel header.

    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:55 +01:00
Petr Oros 71f7e07cbc netdev: add qstat for csum complete
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 13c7c941e72908b8cce5a84b45a7b5e485ca12ed
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Wed May 29 09:35:47 2024 -0700

    netdev: add qstat for csum complete

    Recent commit 0cfe71f45f42 ("netdev: add queue stats") added
    a lot of useful stats, but only those immediately needed by virtio.
    Presumably virtio does not support CHECKSUM_COMPLETE,
    so statistic for that form of checksumming wasn't included.
    Other drivers will definitely need it, in fact we expect it
    to be needed in net-next soon (mlx5). So let's add the definition
    of the counter for CHECKSUM_COMPLETE to uAPI in net already,
    so that the counters are in a more natural order (all subsequent
    counters have not been present in any released kernel, yet).

    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Joe Damato <jdamato@fastly.com>
    Fixes: 0cfe71f45f42 ("netdev: add queue stats")
    Link: https://lore.kernel.org/r/20240529163547.3693194-1-kuba@kernel.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:55 +01:00
Petr Oros 2af97aa79e doc: netlink: Don't 'sanitize' op docstrings in generated .rst
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit ebf9004136c76b7b62fe628a4bc88b3e894b4b95
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Tue May 28 15:06:50 2024 +0100

    doc: netlink: Don't 'sanitize' op docstrings in generated .rst

    The doc strings for do/dump ops are emitted as toplevel .rst constructs
    so they can be multi-line. Pass multi-line text straight through to the
    .rst to retain any simple formatting from the .yaml

    This fixes e.g. list formatting for the pin-get docs in dpll.yaml:

    https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#pin-get

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240528140652.9445-3-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:55 +01:00
Petr Oros fb4954c1bf netdev: Add queue stats for TX stop and wake
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit b56035101e1cdd9c4420ea5da17f09f87fb69285
Author: Daniel Jurgens <danielj@nvidia.com>
Date:   Fri May 10 23:19:26 2024 +0300

    netdev: Add queue stats for TX stop and wake

    TX queue stop and wake are counted by some drivers.
    Support reporting these via netdev-genl queue stats.

    Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
    Link: https://lore.kernel.org/r/20240510201927.1821109-2-danielj@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:54 +01:00
Petr Oros e6059224c2 netlink/specs: Add VF attributes to rt_link spec
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit e497c3228a4e09cdc956f19200ee1d9e84b63f96
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Tue May 7 11:36:03 2024 +0100

    netlink/specs: Add VF attributes to rt_link spec

    Add support for retrieving VFs as part of link info. For example:

    ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
      --do getlink --json '{"ifi-index": 38, "ext-mask": ["vf", "skip-stats"]}'
    {'address': 'b6:75:91:f2:64:65',
     [snip]
     'vfinfo-list': {'info': [{'broadcast': b'\xff\xff\xff\xff\xff\xff\x00\x00'
                                            b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                            b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                            b'\x00\x00\x00\x00\x00\x00\x00\x00',
                               'link-state': {'link-state': 'auto', 'vf': 0},
                               'mac': {'mac': b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                              b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                              b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                              b'\x00\x00\x00\x00\x00\x00\x00\x00',
                                       'vf': 0},
                               'rate': {'max-tx-rate': 0,
                                        'min-tx-rate': 0,
                                        'vf': 0},
                               'rss-query-en': {'setting': 0, 'vf': 0},
                               'spoofchk': {'setting': 0, 'vf': 0},
                               'trust': {'setting': 0, 'vf': 0},
                               'tx-rate': {'rate': 0, 'vf': 0},
                               'vlan': {'qos': 0, 'vf': 0, 'vlan': 0},
                               'vlan-list': {'info': [{'qos': 0,
                                                       'vf': 0,
                                                       'vlan': 0,
                                                       'vlan-proto': 0}]}},
                              {'broadcast': b'\xff\xff\xff\xff\xff\xff\x00\x00'
                                            b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                            b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                            b'\x00\x00\x00\x00\x00\x00\x00\x00',
                               'link-state': {'link-state': 'auto', 'vf': 1},
                               'mac': {'mac': b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                              b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                              b'\x00\x00\x00\x00\x00\x00\x00\x00'
                                              b'\x00\x00\x00\x00\x00\x00\x00\x00',
                                       'vf': 1},
                               'rate': {'max-tx-rate': 0,
                                        'min-tx-rate': 0,
                                        'vf': 1},
                               'rss-query-en': {'setting': 0, 'vf': 1},
                               'spoofchk': {'setting': 0, 'vf': 1},
                               'trust': {'setting': 0, 'vf': 1},
                               'tx-rate': {'rate': 0, 'vf': 1},
                               'vlan': {'qos': 0, 'vf': 1, 'vlan': 0},
                               'vlan-list': {'info': [{'qos': 0,
                                                       'vf': 1,
                                                       'vlan': 0,
                                                       'vlan-proto': 0}]}}]},
     'xdp': {'attached': 0}}

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240507103603.23017-1-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:54 +01:00
Petr Oros f0534f7f8f netdev: add queue stats
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 0cfe71f45f420e412fda2395807a56c453a6e0b6
Author: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Date:   Fri Apr 26 11:39:27 2024 +0800

    netdev: add queue stats

    These stats are commonly. Support reporting those via netdev-genl queue
    stats.

    name: rx-hw-drops
    name: rx-hw-drop-overruns
    name: rx-csum-unnecessary
    name: rx-csum-none
    name: rx-csum-bad
    name: rx-hw-gro-packets
    name: rx-hw-gro-bytes
    name: rx-hw-gro-wire-packets
    name: rx-hw-gro-wire-bytes
    name: rx-hw-drop-ratelimits
    name: tx-hw-drops
    name: tx-hw-drop-errors
    name: tx-csum-none
    name: tx-needs-csum
    name: tx-hw-gso-packets
    name: tx-hw-gso-bytes
    name: tx-hw-gso-wire-packets
    name: tx-hw-gso-wire-bytes
    name: tx-hw-drop-ratelimits

    Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
    Reviewed-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:54 +01:00
Petr Oros a113128d04 netdev: support dumping a single netdev in qstats
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit ce05d0f20368b583b43c99a7c8673e8a7187b76b
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Fri Apr 19 19:35:39 2024 -0700

    netdev: support dumping a single netdev in qstats

    Having to filter the right ifindex in the tests is a bit tedious.
    Add support for dumping qstats for a single ifindex.

    Reviewed-by: David Ahern <dsahern@kernel.org>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/20240420023543.3300306-2-kuba@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:53 +01:00
Petr Oros 77953b4de8 doc/netlink/specs: Add draft nftables spec
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 1ee73168713758515b5a0d6346f58556c9aa72ae
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Thu Apr 18 11:47:34 2024 +0100

    doc/netlink/specs: Add draft nftables spec

    Add a spec for nftables that has nearly complete coverage of the ops,
    but limited coverage of rule types and subexpressions.

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240418104737.77914-2-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:53 +01:00
Petr Oros 3142fb0a37 doc/netlink/specs: Add bond support to rt_link.yaml
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 4ede457542a615b08b1f25a25cb514402d033968
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Tue Apr 9 16:35:04 2024 +0800

    doc/netlink/specs: Add bond support to rt_link.yaml

    Add bond support to rt_link.yaml. Here is an example output:

     $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
       --do getlink --json '{"ifname": "bond0"}' --output-json | jq '.linkinfo'
     {
       "kind": "bond",
       "data": {
         "mode": 4,
         "miimon": 100,
         ...
         "arp-interval": 0,
         "arp-ip-target": [
           "192.168.1.1",
           "192.168.1.2"
         ],
         "arp-validate": 0,
         "arp-all-targets": 0,
         "ns-ip6-target": [
           "2001::1",
           "2001::2"
         ],
         "primary-reselect": 0,
         ...
         "missed-max": 2,
         "ad-info": {
           "aggregator": 1,
           "num-ports": 1,
           "actor-key": 0,
           "partner-key": 1,
           "partner-mac": "00:00:00:00:00:00"
         }
       }
     }

    And here is the downlink info.

     $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
       --do getlink --json '{"ifname": "dummy0"}' --output-json | jq '.linkinfo'
     {
       "kind": "dummy",
       "slave-kind": "bond",
       "slave-data": {
         "state": 0,
         "mii-status": 0,
         "link-failure-count": 0,
         "perm-hwaddr": "f2:82:f7:cc:47:13",
         "queue-id": 0,
         "prio": 0
       }
     }

    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Link: https://lore.kernel.org/r/20240409083504.3900877-1-liuhangbin@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:53 +01:00
Petr Oros 06d547be93 ynl: rename array-nest to indexed-array
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit aa6485d813ad6d884d23e1e9cf3913be29a1f229
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Thu Apr 4 14:31:12 2024 +0800

    ynl: rename array-nest to indexed-array

    Some implementations, like bonding, has nest array with same attr type.
    To support all kinds of entries under one nest array. As discussed[1],
    let's rename array-nest to indexed-array, and assuming the value is
    a nest by passing the type via sub-type.

    [1] https://lore.kernel.org/netdev/20240312100105.16a59086@kernel.org/

    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Link: https://lore.kernel.org/r/20240404063114.1221532-2-liuhangbin@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:53 +01:00
Petr Oros 684026d166 doc: netlink: Update tc spec with missing definitions
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 2dddf8aaf67fe5c5e24e2afa5cbcaabcc7dd4e2a
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Fri Mar 29 13:50:21 2024 +0000

    doc: netlink: Update tc spec with missing definitions

    The tc spec referenced tc-u32-mark and tc-act-police-attrs but did not
    define them. The missing definitions were discovered when building the
    docs with generated hyperlinks because the hyperlink target labels were
    missing.

    Add definitions for tc-u32-mark and tc-act-police-attrs.

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240329135021.52534-4-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:53 +01:00
Petr Oros 2c67ee4350 doc/netlink/specs: Add vlan attr in rt_link spec
JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 782c1084b9fa5bc96c7c1ab5b770dec30834517b
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Wed Mar 27 20:31:29 2024 +0800

    doc/netlink/specs: Add vlan attr in rt_link spec

    With command:
     # ./tools/net/ynl/cli.py \
     --spec Documentation/netlink/specs/rt_link.yaml \
     --do getlink --json '{"ifname": "eno1.2"}' --output-json | \
     jq -C '.linkinfo'

    Before:
    Exception: No message format for 'vlan' in sub-message spec 'linkinfo-data-msg'

    After:
     {
       "kind": "vlan",
       "data": {
         "protocol": "8021q",
         "id": 2,
         "flag": {
           "flags": [
             "reorder-hdr"
           ],
           "mask": "0xffffffff"
         },
         "egress-qos": {
           "mapping": [
             {
               "from": 1,
               "to": 2
             },
             {
               "from": 4,
               "to": 4
             }
           ]
         }
       }
     }

    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240327123130.1322921-3-liuhangbin@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-12-10 10:37:52 +01:00
Rado Vrbovsky fb874c9815 Merge: CNB96: netlink/devlink: update devlink & netlink to the v6.9
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5257

JIRA: https://issues.redhat.com/browse/RHEL-57755
Depends: !5414
Depends: !4753
Signed-off-by: Petr Oros <poros@redhat.com>

Approved-by: Ivan Vecera <ivecera@redhat.com>
Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2024-11-27 11:19:20 +00:00
Rado Vrbovsky 42bc559313 Merge: Update NFS/NFSD/LOCKD/SUNRPC to upstream v6.11 for RHEL 9.6
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5452

JIRA: https://issues.redhat.com/browse/RHEL-59704  
Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4324  
Tested: xfstests, nfstest, pynfs, and git regression tests using kdevops/buildbot.  Manual cthon and xfstests against ONTAP.

This patch series updates the NFS, NFSD, LOCKD, and SUNRPC subsystems to upstream v6.11.  I omitted patches from series originating from other subsystems where NFS was just one of many filesystems being touched (some examples being the "filelock: split file leases out of struct file_lock" series and the "fs: convert core infrastructure to new {a,m}time accessors" series).  

Signed-off-by: Scott Mayhew <smayhew@redhat.com>

Approved-by: Chris von Recklinghausen <crecklin@redhat.com>
Approved-by: Steve Dickson <steved@redhat.com>
Approved-by: Benjamin Coddington <bcodding@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2024-11-22 09:19:01 +00:00
Rado Vrbovsky 423fadbe1e Merge: CNB96: dpll: rebase DPLL to upstream v6.12
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5352

JIRA: https://issues.redhat.com/browse/RHEL-57743

 * ad506586cb6929 dpll: fix return value check for kmemdup  
 * cda1fba15cb228 dpll: add Embedded SYNC feature for a pin  

Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>

---

<small>Created 2024-10-02 15:13 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small>

Approved-by: Ivan Vecera <ivecera@redhat.com>
Approved-by: Michal Schmidt <mschmidt@redhat.com>
Approved-by: Petr Oros <poros@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2024-11-22 09:14:21 +00:00
Petr Oros 95af9fa7fb doc/netlink/specs: Add spec for nlctrl netlink family
JIRA: https://issues.redhat.com/browse/RHEL-57755

Upstream commit(s):
commit 768e044a5fd4cb52e8677e8e18477fa46cfc5329
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Wed Mar 6 23:10:46 2024 +0000

    doc/netlink/specs: Add spec for nlctrl netlink family

    Add a spec for the nlctrl family.

    Example usage:

    ./tools/net/ynl/cli.py \
        --spec Documentation/netlink/specs/nlctrl.yaml \
        --do getfamily --json '{"family-name": "nlctrl"}'

    ./tools/net/ynl/cli.py \
        --spec Documentation/netlink/specs/nlctrl.yaml \
        --dump getpolicy --json '{"family-name": "nlctrl"}'

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240306231046.97158-7-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-11-20 10:13:45 +01:00
Petr Oros 961411044c doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry
JIRA: https://issues.redhat.com/browse/RHEL-57755

Upstream commit(s):
commit 70ff9a91e86850103f71d5920eff6bee81bd2a0d
Author: Alessandro Marcolini <alessandromarcolini99@gmail.com>
Date:   Sat Feb 3 14:16:52 2024 +0100

    doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry

    Add multi-attr attribute to tc-taprio-sched-entry to specify multiple
    entries.

    Signed-off-by: Alessandro Marcolini <alessandromarcolini99@gmail.com>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Reviewed-by: Jakub Kicinski <kuba@kernel.org>
    Link: https://lore.kernel.org/r/0ba5088ea715103a2bce83b12e2dcbdaa08da6ac.1706962013.git.alessandromarcolini99@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
2024-11-20 10:13:42 +01:00
Scott Mayhew 5708b24a02 nfsd: new netlink ops to get/set server pool_mode
JIRA: https://issues.redhat.com/browse/RHEL-59704

commit 00506072d70829196849e835ee4ef0b350b61fb9
Author: Jeff Layton <jlayton@kernel.org>
Date:   Fri Jun 14 08:59:10 2024 -0400

    nfsd: new netlink ops to get/set server pool_mode

    Signed-off-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
2024-11-05 07:34:04 -05:00
Michal Schmidt 50e606d7f0 ethtool: Extend cable testing interface with result source information
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit abcd3026dd63417692a5e80aff70e7cd9b5c14ea
Author: Oleksij Rempel <linux@rempel-privat.de>
Date:   Thu Aug 22 14:07:01 2024 +0200

    ethtool: Extend cable testing interface with result source information

    Extend the ethtool netlink cable testing interface by adding support for
    specifying the source of cable testing results. This allows users to
    differentiate between results obtained through different diagnostic
    methods.

    For example, some TI 10BaseT1L PHYs provide two variants of cable
    diagnostics: Time Domain Reflectometry (TDR) and Active Link Cable
    Diagnostic (ALCD). By introducing `ETHTOOL_A_CABLE_RESULT_SRC` and
    `ETHTOOL_A_CABLE_FAULT_LENGTH_SRC` attributes, this update enables
    drivers to indicate whether the result was derived from TDR or ALCD,
    improving the clarity and utility of diagnostic information.

    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://patch.msgid.link/20240822120703.1393130-2-o.rempel@pengutronix.de
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:39:22 +01:00
Michal Schmidt e8b8972a4b netlink: specs: add ethnl PHY_GET command set
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit d3d9a3e48a63eec82082a7ef76f5d5b6d339933f
Author: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date:   Wed Aug 21 17:10:02 2024 +0200

    netlink: specs: add ethnl PHY_GET command set

    The PHY_GET command, supporting both DUMP and GET operations, is used to
    retrieve the list of PHYs connected to a netdevice, and get topology
    information to know where exactly it sits on the physical link.

    Add the netlink specs corresponding to that command.

    Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
    Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Tested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:39:22 +01:00
Michal Schmidt e18759b526 netlink: specs: add phy-index as a header parameter
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit 9af0e89d6c2433afd3e5e7cc52c7592ef23526c0
Author: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date:   Wed Aug 21 17:10:00 2024 +0200

    netlink: specs: add phy-index as a header parameter

    Update the spec to take the newly introduced phy-index as a generic
    request parameter.

    Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Tested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:39:22 +01:00
Michal Schmidt 12dcb9cc9a netlink: specs: decode indirection table as u32 array
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit 8ad3be135212a99fe16961de0e6d7d0ddd8268a2
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Fri Aug 9 22:37:27 2024 -0700

    netlink: specs: decode indirection table as u32 array

    Indirection table is dumped as a raw u32 array, decode it.
    It's tempting to decode hash key, too, but it is an actual
    bitstream, so leave it be for now.

    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:36:13 +01:00
Michal Schmidt ddc035fbf4 ethtool: rss: support skipping contexts during dump
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit 3d50c66c0609c8b64fb22e9c188fca88f34e7c98
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Fri Aug 9 22:37:26 2024 -0700

    ethtool: rss: support skipping contexts during dump

    Applications may want to deal with dynamic RSS contexts only.
    So dumping context 0 will be counter-productive for them.
    Support starting the dump from a given context ID.

    Alternative would be to implement a dump flag to skip just
    context 0, not sure which is better...

    Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:36:13 +01:00
Michal Schmidt 8537fa48af ethtool: rss: support dumping RSS contexts
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit f6122900f4e28bfcb8abc76e1f7b83a1e0d8afd3
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Fri Aug 9 22:37:25 2024 -0700

    ethtool: rss: support dumping RSS contexts

    Now that we track RSS contexts in the core we can easily dump
    them. This is a major introspection improvement, as previously
    the only way to find all contexts would be to try all ids
    (of which there may be 2^32 - 1).

    Don't use the XArray iterators (like xa_for_each_start()) as they
    do not move the index past the end of the array once done, which
    caused multiple bugs in Netlink dumps in the past.

    Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
    Reviewed-by: Joe Damato <jdamato@fastly.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:36:12 +01:00
Scott Mayhew 38113b80a4 NFSD: add listener-{set,get} netlink command
JIRA: https://issues.redhat.com/browse/RHEL-59704

commit 16a471177496c8e04a9793812c187a2c1a2192fa
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Tue Apr 23 15:25:44 2024 +0200

    NFSD: add listener-{set,get} netlink command

    Introduce write_ports netlink command. For listener-set, userspace is
    expected to provide a NFS listeners list it wants enabled. All other
    sockets will be closed.

    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Co-developed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
2024-10-25 12:36:16 -04:00
Scott Mayhew 6b37a9ead5 NFSD: add write_version to netlink command
JIRA: https://issues.redhat.com/browse/RHEL-59704
Conflicts:
	fs/nfsd/netlink.h: Context difference due to out of order backport of
	da2c8fef130e ("NFSD: grab nfsd_mutex in nfsd_nl_rpc_status_get_dumpit()")

commit 5a939bea25be9793d9aa5d8494df667dfe625e6b
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Tue Apr 23 15:25:41 2024 +0200

    NFSD: add write_version to netlink command

    Introduce write_version netlink command through a "declarative" interface.
    This patch introduces a change in behavior since for version-set userspace
    is expected to provide a NFS major/minor version list it wants to enable
    while all the other ones will be disabled. (procfs write_version
    command implements imperative interface where the admin writes +3/-3 to
    enable/disable a single version.

    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Tested-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
2024-10-25 12:36:15 -04:00
Scott Mayhew 69e4bd1375 NFSD: convert write_threads to netlink command
JIRA: https://issues.redhat.com/browse/RHEL-59704

commit 924f4fb003ba114c60b3c07a011dcd86a8956cd1
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Tue Apr 23 15:25:40 2024 +0200

    NFSD: convert write_threads to netlink command

    Introduce write_threads netlink command similar to the one available
    through the procfs.

    Tested-by: Jeff Layton <jlayton@kernel.org>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Co-developed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
2024-10-25 12:36:15 -04:00
Davide Caratti 089fe5cd10 doc: netlink: specs: tc: flower: add enc-flags
JIRA: https://issues.redhat.com/browse/RHEL-3647
Upstream Status: net-next.git commit 880a51a8ab8cbdeb9c2d35a5147d30b7fc0893e4

commit 880a51a8ab8cbdeb9c2d35a5147d30b7fc0893e4
Author: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Date:   Sat Jul 13 02:19:07 2024 +0000

    doc: netlink: specs: tc: flower: add enc-flags

    Describe key-enc-flags and key-enc-flags-mask.

    These are defined similarly to key-flags and key-flags-mask.

    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://patch.msgid.link/20240713021911.1631517-11-ast@fiberby.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2024-10-21 16:23:53 +02:00
Davide Caratti 868e79117d doc/netlink/specs: Update the tc spec
JIRA: https://issues.redhat.com/browse/RHEL-3647
Upstream Status: net.git commit 2267672a6190cfb0349e95a70e09dc6a973007c1

commit 2267672a6190cfb0349e95a70e09dc6a973007c1
Author: Donald Hunter <donald.hunter@gmail.com>
Date:   Mon Jan 29 22:34:58 2024 +0000

    doc/netlink/specs: Update the tc spec

    Fill in many of the gaps in the tc netlink spec, including stats attrs,
    classes and actions. Many documentation strings have also been added.

    This is still a work in progress, albeit fairly complete:
     - there are still many attributes left as binary blobs.
     - actions have not had much testing

    Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Link: https://lore.kernel.org/r/20240129223458.52046-14-donald.hunter@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2024-10-21 16:23:53 +02:00
Davide Caratti 6a67f8d906 net/sched: flower: define new tunnel flags
JIRA: https://issues.redhat.com/browse/RHEL-3647
Upstream Status: net-next.git commit bfda5a63137bc83c344c4d995f404c8e701ff0fa

commit bfda5a63137bc83c344c4d995f404c8e701ff0fa
Author: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Date:   Sat Jul 13 02:19:00 2024 +0000

    net/sched: flower: define new tunnel flags

    Define new TCA_FLOWER_KEY_FLAGS_* flags for use in struct
    flow_dissector_key_control, covering the same flags as
    currently exposed through TCA_FLOWER_KEY_ENC_FLAGS.

    Put the new flags under FLOW_DIS_F_*. The idea is that we can
    later, move the existing flags under FLOW_DIS_F_* as well.

    The ynl flag names have been taken from the RFC iproute2 patch.

    Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://patch.msgid.link/20240713021911.1631517-4-ast@fiberby.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2024-10-21 16:23:53 +02:00
Davide Caratti 462f1d38a5 doc: netlink: specs: tc: describe flower control flags
JIRA: https://issues.redhat.com/browse/RHEL-3647
Upstream Status: net-next.git commit 49ba9fc1c7736e935f7606920c5092b2bbb0d1e4

commit 49ba9fc1c7736e935f7606920c5092b2bbb0d1e4
Author: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Date:   Sat Jul 13 02:18:59 2024 +0000

    doc: netlink: specs: tc: describe flower control flags

    Describe the flower control flags, and use them
    for key-flags and key-flags-mask.

    The flag names have been taken from iproute2.

    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Link: https://patch.msgid.link/20240713021911.1631517-3-ast@fiberby.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2024-10-21 16:23:53 +02:00
Rado Vrbovsky 137303ff8d Merge: CNB96: dpll: expose lock status error value to user
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5282

JIRA: https://issues.redhat.com/browse/RHEL-59895   

Patches expose dpll lock status error value to user.
 
Signed-off-by: Petr Oros <poros@redhat.com>

Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com>
Approved-by: Ivan Vecera <ivecera@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2024-10-20 09:00:47 +00:00
Rado Vrbovsky 40945cb730 Merge: CNB96: net/ethtool: rebase to v6.11
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5197

JIRA: https://issues.redhat.com/browse/RHEL-57750  
Depends: !5196

This updates the ethtool subsystem to v6.11. At the end of this series, the only remaining diffs from v6.11 are the RH_KABI_RESERVES in struct ethtool_ops, as shown by:  
`git diff v6.11 -- net/ethtool include/linux/ethtool.h include/uapi/linux/ethtool{,_netlink}.h Documentation/netlink/specs/ethtool.yaml Documentation/networking/ethtool-netlink.rst tools/net/ynl/ethtool.py`

Omitted-Fix: 9dbad38336a9 ("eth: bnxt: populate defaults in the RSS context struct")
 - bnxt has not been converted to .create_rxfh_context yet.
   This will be in a driver update later.

Omitted-Fix: cdc90f75387c ("pse-core: Conditionally set current limit during PI regulator registration")  
Omitted-Fix: 326f442784c2 ("net: pse-pd: pse_core: Fix pse regulator type")
 - All changes to pse_core.c omitted in the series.

Omitted-Fix: 2fa809b90617 ("net: pse-pd: Kconfig: Add missing Regulator API dependency")
 - Irrelevant. CONFIG_PSE_CONTROLLER is disabled.

Omitted-Fix: 93c3a96c301f ("net: pse-pd: Do not return EOPNOSUPP if config is null")
 - Contained in the merge conflict resolution backported in "net: ethtool: pse-pd: Fix possible null-deref".

Omitted-Fix: dda3529d2e84 ("net: pse-pd: Fix enabled status mismatch")
 - Irrelevant. CONFIG_PSE_CONTROLLER is disabled.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Approved-by: Antoine Tenart <atenart@redhat.com>
Approved-by: Ivan Vecera <ivecera@redhat.com>
Approved-by: Eric Chanudet <echanude@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2024-10-19 08:11:42 +00:00
CKI Backport Bot aaa6737876 dpll: add Embedded SYNC feature for a pin
JIRA: https://issues.redhat.com/browse/RHEL-57743

commit cda1fba15cb2282b3c364805c9767698f11c3b0e
Author: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Date:   Fri Aug 23 00:25:12 2024 +0200

    dpll: add Embedded SYNC feature for a pin

    Implement and document new pin attributes for providing Embedded SYNC
    capabilities to the DPLL subsystem users through a netlink pin-get
    do/dump messages. Allow the user to set Embedded SYNC frequency with
    pin-set do netlink message.

    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Link: https://patch.msgid.link/20240822222513.255179-2-arkadiusz.kubalewski@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
2024-10-02 15:13:50 +00:00
Michal Schmidt 1e0691816c ethtool: rss: echo the context number back
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit f96aae91b0d260f682e630e092ef70a05a718a43
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Wed Jul 24 16:42:49 2024 -0700

    ethtool: rss: echo the context number back

    The response to a GET request in Netlink should fully identify
    the queried object. RSS_GET accepts context id as an input,
    so it must echo that attribute back to the response.

    After (assuming context 1 has been created):

      $ ./cli.py --spec netlink/specs/ethtool.yaml \
                 --do rss-get \
                 --json '{"header": {"dev-index": 2}, "context": 1}'
      {'context': 1,
       'header': {'dev-index': 2, 'dev-name': 'eth0'},
      [...]

    Fixes: 7112a04664bf ("ethtool: add netlink based get rss support")
    Acked-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Joe Damato <jdamato@fastly.com>
    Link: https://patch.msgid.link/20240724234249.2621109-3-kuba@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:15 +02:00
Michal Schmidt d1cbe5f4b6 netlink: specs: correct the spec of ethtool
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit a40c7a24f97edda025f53cfe8f0bc6a6e3c12fa6
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Wed Jul 24 16:42:48 2024 -0700

    netlink: specs: correct the spec of ethtool

    The spec for Ethtool is a bit inaccurate. We don't currently
    support dump. Context is only accepted as input and not echoed
    to output (which is a separate bug).

    Fixes: a353318ebf24 ("tools: ynl: populate most of the ethtool spec")
    Acked-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Joe Damato <jdamato@fastly.com>
    Link: https://patch.msgid.link/20240724234249.2621109-2-kuba@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:15 +02:00
Michal Schmidt 3774550574 netlink: specs: Expand the PSE netlink command with C33 pw-limit attributes
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit dac3de193095a0cb579e5d31c237e3e447e4a9b6
Author: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Date:   Thu Jul 4 10:12:01 2024 +0200

    netlink: specs: Expand the PSE netlink command with C33 pw-limit attributes

    Expand the c33 PSE attributes with power limit to be able to set and get
    the PSE Power Interface power limit.

    ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get
                 --json '{"header":{"dev-name":"eth1"}}'
    {'c33-pse-actual-pw': 1700,
     'c33-pse-admin-state': 3,
     'c33-pse-avail-pw-limit': 97500,
     'c33-pse-pw-class': 4,
     'c33-pse-pw-d-status': 4,
     'c33-pse-pw-limit-ranges': [{'max': 18100, 'min': 15000},
                                 {'max': 38000, 'min': 30000},
                                 {'max': 65000, 'min': 60000},
                                 {'max': 97500, 'min': 90000}],
     'header': {'dev-index': 5, 'dev-name': 'eth1'}}

    ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-set
                 --json '{"header":{"dev-name":"eth1"},
                          "c33-pse-avail-pw-limit":19000}'
    None

    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-6-320003204264@bootlin.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:14 +02:00
Michal Schmidt bde44383bf netlink: specs: Expand the PSE netlink command with C33 new features
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit c8149739af864227485abe4f79184c25a601211f
Author: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Date:   Thu Jul 4 10:11:57 2024 +0200

    netlink: specs: Expand the PSE netlink command with C33 new features

    Expand the c33 PSE attributes with PSE class, extended state information
    and power consumption.

    ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get
                 --json '{"header":{"dev-name":"eth0"}}'
    {'c33-pse-actual-pw': 1700,
     'c33-pse-admin-state': 3,
     'c33-pse-pw-class': 4,
     'c33-pse-pw-d-status': 4,
     'header': {'dev-index': 4, 'dev-name': 'eth0'}}

    ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get
                 --json '{"header":{"dev-name":"eth0"}}'
    {'c33-pse-admin-state': 3,
     'c33-pse-ext-state': 'mr-mps-valid',
     'c33-pse-ext-substate': 2,
     'c33-pse-pw-d-status': 2,
     'header': {'dev-index': 4, 'dev-name': 'eth0'}}

    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-2-320003204264@bootlin.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:14 +02:00
Michal Schmidt 218531b94c ethtool: Add an interface for flashing transceiver modules' firmware
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit 46fb3ba95b93d1887e6dfa02a535e0526062de95
Author: Danielle Ratson <danieller@nvidia.com>
Date:   Thu Jun 27 17:08:50 2024 +0300

    ethtool: Add an interface for flashing transceiver modules' firmware

    CMIS compliant modules such as QSFP-DD might be running a firmware that
    can be updated in a vendor-neutral way by exchanging messages between
    the host and the module as described in section 7.3.1 of revision 5.2 of
    the CMIS standard.

    Add a pair of new ethtool messages that allow:

    * User space to trigger firmware update of transceiver modules

    * The kernel to notify user space about the progress of the process

    The user interface is designed to be asynchronous in order to avoid
    RTNL being held for too long and to allow several modules to be
    updated simultaneously. The interface is designed with CMIS compliant
    modules in mind, but kept generic enough to accommodate future use
    cases, if these arise.

    Signed-off-by: Danielle Ratson <danieller@nvidia.com>
    Reviewed-by: Petr Machata <petrm@nvidia.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Conflicts:
	tools/net/ynl/Makefile.deps - Missing commit:
	8f109e91b852 ("tools: ynl: include dpll and mptcp_pm in C codegen")

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:13 +02:00
Michal Schmidt a4fa64a452 ethtool: provide customized dim profile management
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit f750dfe825b904164688adeb147950e0e0c4d262
Author: Heng Qi <hengqi@linux.alibaba.com>
Date:   Fri Jun 21 18:13:51 2024 +0800

    ethtool: provide customized dim profile management

    The NetDIM library, currently leveraged by an array of NICs, delivers
    excellent acceleration benefits. Nevertheless, NICs vary significantly
    in their dim profile list prerequisites.

    Specifically, virtio-net backends may present diverse sw or hw device
    implementation, making a one-size-fits-all parameter list impractical.
    On Alibaba Cloud, the virtio DPU's performance under the default DIM
    profile falls short of expectations, partly due to a mismatch in
    parameter configuration.

    I also noticed that ice/idpf/ena and other NICs have customized
    profilelist or placed some restrictions on dim capabilities.

    Motivated by this, I tried adding new params for "ethtool -C" that provides
    a per-device control to modify and access a device's interrupt parameters.

    Usage
    ========
    The target NIC is named ethx.

    Assume that ethx only declares support for rx profile setting
    (with DIM_PROFILE_RX flag set in profile_flags) and supports modification
    of usec and pkt fields.

    1. Query the currently customized list of the device

    $ ethtool -c ethx
    ...
    rx-profile:
    {.usec =   1, .pkts = 256, .comps = n/a,},
    {.usec =   8, .pkts = 256, .comps = n/a,},
    {.usec =  64, .pkts = 256, .comps = n/a,},
    {.usec = 128, .pkts = 256, .comps = n/a,},
    {.usec = 256, .pkts = 256, .comps = n/a,}
    tx-profile:   n/a

    2. Tune
    $ ethtool -C ethx rx-profile 1,1,n_2,n,n_3,3,n_4,4,n_n,5,n
    "n" means do not modify this field.
    $ ethtool -c ethx
    ...
    rx-profile:
    {.usec =   1, .pkts =   1, .comps = n/a,},
    {.usec =   2, .pkts = 256, .comps = n/a,},
    {.usec =   3, .pkts =   3, .comps = n/a,},
    {.usec =   4, .pkts =   4, .comps = n/a,},
    {.usec = 256, .pkts =   5, .comps = n/a,}
    tx-profile:   n/a

    3. Hint
    If the device does not support some type of customized dim profiles,
    the corresponding "n/a" will display.

    If the "n/a" field is being modified, -EOPNOTSUPP will be reported.

    Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20240621101353.107425-4-hengqi@linux.alibaba.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Conflicts:
	include/linux/netdevice.h - RH_KABI_RESERVEs at the end.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:13 +02:00
Michal Schmidt 0810c20aaa netlink: specs: Fix pse-set command attributes
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit 42354e3c3150cf886457f3354af0acefc56b53a2
Author: Kory Maincent <kory.maincent@bootlin.com>
Date:   Fri Jun 21 15:00:59 2024 +0200

    netlink: specs: Fix pse-set command attributes

    Not all PSE attributes are used for the pse-set netlink command.
    Select only the ones used by ethtool.

    Fixes: f8586411e40e ("netlink: specs: Expand the pse netlink command with PoE interface")
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:19:13 +02:00
Michal Schmidt 16d76d09e1 netlink: specs: Expand the pse netlink command with PoE interface
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit f8586411e40ea8152c7a030e4f1d9bd9005e2628
Author: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Date:   Wed Apr 17 16:39:53 2024 +0200

    netlink: specs: Expand the pse netlink command with PoE interface

    Add the PoE pse attributes prefix to be able to use PoE interface.

    Example usage:
    ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get \
                 --json '{"header":{"dev-name":"eth0"}}'
    {'header': {'dev-index': 4, 'dev-name': 'eth0'},
     'c33-pse-admin-state': 3,
     'c33-pse-pw-d-status': 4}

    ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-set \
                 --json '{"header":{"dev-name":"eth0"},
                         "c33-pse-admin-control":3}'

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240417-feature_poe-v9-5-242293fd1900@bootlin.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:14:23 +02:00
Michal Schmidt a991128003 netlink: specs: Modify pse attribute prefix
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit 57b30d2a5475eb837fe1124f15f93a2a230c7bf3
Author: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Date:   Wed Apr 17 16:39:52 2024 +0200

    netlink: specs: Modify pse attribute prefix

    Remove podl from the attribute prefix to prepare the support of PoE pse
    netlink spec.

    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240417-feature_poe-v9-4-242293fd1900@bootlin.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 12:14:22 +02:00
Michal Schmidt cc8e08ef16 netlink: specs: ethtool: define header-flags as an enum
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit ff8877b04ef282b2bdb16c9dccc2e42216a34f62
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Fri Apr 5 22:22:38 2024 -0700

    netlink: specs: ethtool: define header-flags as an enum

    Recent changes added header flags to the spec.
    Use an enum instead of defines for more seamless codegen.

    [Jakub: drop the already applied parts and rewrite message]

    Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
    Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
    Link: https://lore.kernel.org/r/20240403212931.128541-6-rrameshbabu@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 08:41:13 +02:00
Michal Schmidt 2fd4d391f6 ethtool: add interface to read Tx hardware timestamping statistics
JIRA: https://issues.redhat.com/browse/RHEL-57750

commit 0e9c127729be19adcdf2f5cc1f3450a4322fdf3a
Author: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Date:   Wed Apr 3 14:28:39 2024 -0700

    ethtool: add interface to read Tx hardware timestamping statistics

    Multiple network devices that support hardware timestamping appear to have
    common behavior with regards to timestamp handling. Implement common Tx
    hardware timestamping statistics in a tx_stats struct_group. Common Rx
    hardware timestamping statistics can subsequently be implemented in a
    rx_stats struct_group for ethtool_ts_stats.

    Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
    Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
    Link: https://lore.kernel.org/r/20240403212931.128541-2-rrameshbabu@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-10-01 08:41:13 +02:00