06 Jan, 2021

2 commits

  • [ Upstream commit efb796f5571f030743e1d9c662cdebdad724f8c5 ]

    Syzbot reported a shift of a u32 by more than 31 in strset_parse_request()
    which is undefined behavior. This is caused by range check of string set id
    using variable ret (which is always 0 at this point) instead of id (string
    set id from request).

    Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request")
    Reported-by: syzbot+96523fb438937cd01220@syzkaller.appspotmail.com
    Signed-off-by: Michal Kubecek
    Link: https://lore.kernel.org/r/b54ed5c5fd972a59afea3e1badfb36d86df68799.1607952208.git.mkubecek@suse.cz
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Greg Kroah-Hartman

    Michal Kubecek
     
  • [ Upstream commit ef72cd3c5ce168829c6684ecb2cae047d3493690 ]

    Fix two error paths in ethnl_set_channels() to avoid lock-up caused
    but unreleased RTNL.

    Fixes: e19c591eafad ("ethtool: set device channel counts with CHANNELS_SET request")
    Reported-by: LiLiang
    Signed-off-by: Ivan Vecera
    Reviewed-by: Michal Kubecek
    Link: https://lore.kernel.org/r/20201215090810.801777-1-ivecera@redhat.com
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Greg Kroah-Hartman

    Ivan Vecera
     

10 Dec, 2020

1 commit

  • Syzbot reported a stack overflow in bitmap_from_arr32() called from
    ethnl_parse_bitset() when bitset from netlink message is longer than
    target bitmap length. While ethnl_compact_sanity_checks() makes sure that
    trailing part is all zeros (i.e. the request does not try to touch bits
    kernel does not recognize), we also need to cap change_bits to nbits so
    that we don't try to write past the prepared bitmaps.

    Fixes: 88db6d1e4f62 ("ethtool: add ethnl_parse_bitset() helper")
    Reported-by: syzbot+9d39fa49d4df294aab93@syzkaller.appspotmail.com
    Signed-off-by: Michal Kubecek
    Link: https://lore.kernel.org/r/3487ee3a98e14cd526f55b6caaa959d2dcbcad9f.1607465316.git.mkubecek@suse.cz
    Signed-off-by: Jakub Kicinski

    Michal Kubecek
     

10 Nov, 2020

1 commit

  • After updating userspace Ethtool from 5.7 to 5.9, I noticed that
    NETDEV_FEAT_CHANGE is no more raised when changing netdev features
    through Ethtool.
    That's because the old Ethtool ioctl interface always calls
    netdev_features_change() at the end of user request processing to
    inform the kernel that our netdevice has some features changed, but
    the new Netlink interface does not. Instead, it just notifies itself
    with ETHTOOL_MSG_FEATURES_NTF.
    Replace this ethtool_notify() call with netdev_features_change(), so
    the kernel will be aware of any features changes, just like in case
    with the ioctl interface. This does not omit Ethtool notifications,
    as Ethtool itself listens to NETDEV_FEAT_CHANGE and drops
    ETHTOOL_MSG_FEATURES_NTF on it
    (net/ethtool/netlink.c:ethnl_netdev_event()).

    From v1 [1]:
    - dropped extra new line as advised by Jakub;
    - no functional changes.

    [1] https://lore.kernel.org/netdev/AlZXQ2o5uuTVHCfNGOiGgJ8vJ3KgO5YIWAnQjH0cDE@cp3-web-009.plabs.ch

    Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
    Signed-off-by: Alexander Lobakin
    Reviewed-by: Michal Kubecek
    Link: https://lore.kernel.org/r/ahA2YWXYICz5rbUSQqNG4roJ8OlJzzYQX7PTiG80@cp4-web-028.plabs.ch
    Signed-off-by: Jakub Kicinski

    Alexander Lobakin
     

09 Oct, 2020

2 commits

  • This accidentally got wired up to the *get* policy instead
    of the *set* policy, causing operations to be rejected. Fix
    it by wiring up the correct policy instead.

    Fixes: 5028588b62cb ("ethtool: wire up set policies to ops")
    Reported-by: Leon Romanovsky
    Signed-off-by: Johannes Berg
    Tested-by: Leon Romanovsky
    Reviewed-by: Jakub Kicinski
    Signed-off-by: Jakub Kicinski

    Johannes Berg
     
  • The ETHTOOL_A_STRSET_COUNTS_ONLY flag attribute was previously
    not allowed to be used, but now due to the policy size reduction
    we would access the tb[] array out of bounds since we tried to
    check for the attribute despite it not being accepted.

    Fix both issues by adding it correctly to the appropriate policy.

    Fixes: ff419afa4310 ("ethtool: trim policy tables")
    Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request")
    Reported-by: Leon Romanovsky
    Signed-off-by: Johannes Berg
    Tested-by: Leon Romanovsky
    Reviewed-by: Jakub Kicinski
    Signed-off-by: Jakub Kicinski

    Johannes Berg
     

06 Oct, 2020

7 commits

  • Perform header flags validation through the policy.

    Only pause command supports ETHTOOL_FLAG_STATS. Create a separate
    policy to be able to express that in policy dumps to user space.

    Note that even though the core will validate the header policy,
    it cannot record multiple layers of attributes and we have to
    re-parse header sub-attrs. When doing so we could skip attribute
    validation, or use most permissive policy. Opt for the former.

    We will no longer return the extack cookie for flags but since
    we only added first new flag in this release it's not expected
    that any user space had a chance to make use of it.

    v2: - remove the re-validation in ethnl_parse_header_dev_get()

    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • To get the most out of parsing by the core, and to allow dumping
    full policies we need to specify which policy applies to nested
    attrs. For headers it's ethnl_header_policy.

    $ sed -i 's@\(ETHTOOL_A_.*HEADER\].*=\) { .type = NLA_NESTED },@\1\n\t\tNLA_POLICY_NESTED(ethnl_header_policy),@' net/ethtool/*

    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Since ethtool uses strict attribute validation there's no need
    to initialize all attributes in policy tables. 0 is NLA_UNSPEC
    which is going to be rejected. Remove the NLA_REJECTs.

    Similarly attributes above maxattrs are rejected, so there's
    no need to always size the policy tables to ETHTOOL_A_..._MAX.

    v2: - new patch

    Suggested-by: Johannes Berg
    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Similarly to get commands wire up the policies of set commands
    to get parsing by the core and policy dumps.

    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Wire up policies for get commands in struct nla_policy of the ethtool
    family. Make use of genetlink code attr validation and parsing, as well
    as allow dumping policies to user space.

    For every ETHTOOL_MSG_*_GET:
    - add 'ethnl_' prefix to policy name
    - add extern declaration in net/ethtool/netlink.h
    - wire up the policy & attr in ethtool_genl_ops[].
    - remove .request_policy and .max_attr from ethnl_request_ops.

    Obviously core only records the first "layer" of parsed attrs
    so we still need to parse the sub-attrs of the nested header
    attribute.

    v2:
    - merge of patches 1 and 2 from v1
    - remove stray empty lines in ops
    - also remove .max_attr

    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Define get/set phy tunable callbacks in ethtool ops.
    This will allow MAC drivers with integrated PHY still to implement
    these tunables.

    Reviewed-by: Andrew Lunn
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Igor Russkikh
     
  • Rejecting non-native endian BTF overlapped with the addition
    of support for it.

    The rest were more simple overlapping changes, except the
    renesas ravb binding update, which had to follow a file
    move as well as a YAML conversion.

    Signed-off-by: David S. Miller

    David S. Miller
     

29 Sep, 2020

1 commit

  • Like all genl families ethtool_genl_family needs to not
    be a straight up constant, because it's modified/initialized
    by genl_register_family(). After init, however, it's only
    passed to genlmsg_put() & co. therefore we can mark it
    as __ro_after_init.

    Since genl_family structure contains function pointers
    mark this as a fix.

    Fixes: 2b4a8990b7df ("ethtool: introduce ethtool netlink interface")
    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     

23 Sep, 2020

1 commit

  • Two minor conflicts:

    1) net/ipv4/route.c, adding a new local variable while
    moving another local variable and removing it's
    initial assignment.

    2) drivers/net/dsa/microchip/ksz9477.c, overlapping changes.
    One pretty prints the port mode differently, whilst another
    changes the driver to try and obtain the port mode from
    the port node rather than the switch node.

    Signed-off-by: David S. Miller

    David S. Miller
     

20 Sep, 2020

1 commit

  • Add entries for the 100base-FX full and half duplex supported modes.

    $ ethtool eth0
    Supported ports: [ FIBRE ]
    Supported link modes: 100baseFX/Half 100baseFX/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: No
    Supported FEC modes: Not reported
    Advertised link modes: 100baseFX/Half 100baseFX/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Advertised FEC modes: Not reported
    Speed: 100Mb/s
    Duplex: Full
    Auto-negotiation: off
    Port: MII
    PHYAD: 1
    Transceiver: external
    Supports Wake-on: gs
    Wake-on: d
    SecureOn password: 00:00:00:00:00:00
    Current message level: 0x00000000 (0)

    Link detected: yes

    Signed-off-by: Dan Murphy
    Reviewed-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Dan Murphy
     

18 Sep, 2020

1 commit

  • Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd
    field in genetlink header) for replies to tunnel info netlink request, i.e.
    the same value as the request have. This is a problem because we are using
    two separate enums for userspace to kernel and kernel to userspace message
    types so that this ETHTOOL_MSG_TUNNEL_INFO_GET (28) collides with
    ETHTOOL_MSG_CABLE_TEST_TDR_NTF which is what message type 28 means for
    kernel to userspace messages.

    As the tunnel info request reached mainline in 5.9 merge window, we should
    still be able to fix the reply message type without breaking backward
    compatibility.

    Fixes: c7d759eb7b12 ("ethtool: add tunnel info interface")
    Signed-off-by: Michal Kubecek
    Reviewed-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Michal Kubecek
     

16 Sep, 2020

1 commit

  • Currently drivers have to report their pause frames statistics
    via ethtool -S, and there is a wide variety of names used for
    these statistics.

    Add the two statistics defined in IEEE 802.3x to the standard
    API. Create a new ethtool request header flag for including
    statistics in the response to GET commands.

    Always create the ETHTOOL_A_PAUSE_STATS nest in replies when
    flag is set. Testing if driver declares the op is not a reliable
    way of checking if any stats will actually be included and therefore
    we don't want to give the impression that presence of
    ETHTOOL_A_PAUSE_STATS indicates driver support.

    Note that this patch does not include PFC counters, which may fit
    better in dcbnl? But mostly I don't need them/have a setup to test
    them so I haven't looked deeply into exposing them :)

    v3:
    - add a helper for "uninitializing" stats, rather than a cryptic
    memset() (Andrew)

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Jakub Kicinski
     

04 Sep, 2020

1 commit

  • If ops->set_phys_id() returned an error, previously we would only break
    out of the inner loop, which neither stopped the outer loop nor returned
    the error to the user (since 'rc' would be overwritten on the next pass
    through the loop).
    Thus, rewrite it to use a single loop, so that the break does the right
    thing. Use u64 for 'count' and 'i' to prevent overflow in case of
    (unreasonably) large values of id.data and n.

    Signed-off-by: Edward Cree
    Signed-off-by: David S. Miller

    Edward Cree
     

02 Sep, 2020

1 commit

  • Daniel Borkmann says:

    ====================
    pull-request: bpf-next 2020-09-01

    The following pull-request contains BPF updates for your *net-next* tree.

    There are two small conflicts when pulling, resolve as follows:

    1) Merge conflict in tools/lib/bpf/libbpf.c between 88a82120282b ("libbpf: Factor
    out common ELF operations and improve logging") in bpf-next and 1e891e513e16
    ("libbpf: Fix map index used in error message") in net-next. Resolve by taking
    the hunk in bpf-next:

    [...]
    scn = elf_sec_by_idx(obj, obj->efile.btf_maps_shndx);
    data = elf_sec_data(obj, scn);
    if (!scn || !data) {
    pr_warn("elf: failed to get %s map definitions for %s\n",
    MAPS_ELF_SEC, obj->path);
    return -EINVAL;
    }
    [...]

    2) Merge conflict in drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c between
    9647c57b11e5 ("xsk: i40e: ice: ixgbe: mlx5: Test for dma_need_sync earlier for
    better performance") in bpf-next and e20f0dbf204f ("net/mlx5e: RX, Add a prefetch
    command for small L1_CACHE_BYTES") in net-next. Resolve the two locations by retaining
    net_prefetch() and taking xsk_buff_dma_sync_for_cpu() from bpf-next. Should look like:

    [...]
    xdp_set_data_meta_invalid(xdp);
    xsk_buff_dma_sync_for_cpu(xdp, rq->xsk_pool);
    net_prefetch(xdp->data);
    [...]

    We've added 133 non-merge commits during the last 14 day(s) which contain
    a total of 246 files changed, 13832 insertions(+), 3105 deletions(-).

    The main changes are:

    1) Initial support for sleepable BPF programs along with bpf_copy_from_user() helper
    for tracing to reliably access user memory, from Alexei Starovoitov.

    2) Add BPF infra for writing and parsing TCP header options, from Martin KaFai Lau.

    3) bpf_d_path() helper for returning full path for given 'struct path', from Jiri Olsa.

    4) AF_XDP support for shared umems between devices and queues, from Magnus Karlsson.

    5) Initial prep work for full BPF-to-BPF call support in libbpf, from Andrii Nakryiko.

    6) Generalize bpf_sk_storage map & add local storage for inodes, from KP Singh.

    7) Implement sockmap/hash updates from BPF context, from Lorenz Bauer.

    8) BPF xor verification for scalar types & add BPF link iterator, from Yonghong Song.

    9) Use target's prog type for BPF_PROG_TYPE_EXT prog verification, from Udip Pant.

    10) Rework BPF tracing samples to use libbpf loader, from Daniel T. Lee.

    11) Fix xdpsock sample to really cycle through all buffers, from Weqaar Janjua.

    12) Improve type safety for tun/veth XDP frame handling, from Maciej Żenczykowski.

    13) Various smaller cleanups and improvements all over the place.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Sep, 2020

2 commits

  • Rename the AF_XDP zero-copy driver interface functions to better
    reflect what they do after the replacement of umems with buffer
    pools in the previous commit. Mostly it is about replacing the
    umem name from the function names with xsk_buff and also have
    them take the a buffer pool pointer instead of a umem. The
    various ring functions have also been renamed in the process so
    that they have the same naming convention as the internal
    functions in xsk_queue.h. This so that it will be clearer what
    they do and also for consistency.

    Signed-off-by: Magnus Karlsson
    Signed-off-by: Daniel Borkmann
    Acked-by: Björn Töpel
    Link: https://lore.kernel.org/bpf/1598603189-32145-3-git-send-email-magnus.karlsson@intel.com

    Magnus Karlsson
     
  • Replace the explicit umem reference passed to the driver in AF_XDP
    zero-copy mode with the buffer pool instead. This in preparation for
    extending the functionality of the zero-copy mode so that umems can be
    shared between queues on the same netdev and also between netdevs. In
    this commit, only an umem reference has been added to the buffer pool
    struct. But later commits will add other entities to it. These are
    going to be entities that are different between different queue ids
    and netdevs even though the umem is shared between them.

    Signed-off-by: Magnus Karlsson
    Signed-off-by: Daniel Borkmann
    Acked-by: Björn Töpel
    Link: https://lore.kernel.org/bpf/1598603189-32145-2-git-send-email-magnus.karlsson@intel.com

    Magnus Karlsson
     

24 Aug, 2020

1 commit


21 Aug, 2020

1 commit

  • Set IP protocol mask only when IP protocol field is set.
    This will allow flow-type ether with vlan rule which don't have
    protocol field to apply.

    ethtool -N ens5f4 flow-type ether proto 0x8100 vlan 0x600\
    m 0x1FFF action 3 loc 16

    Signed-off-by: Vishal Kulkarni
    Reviewed-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Vishal Kulkarni
     

19 Aug, 2020

3 commits

  • The legacy ethtool userspace tool shows an error when no features could
    be changed. It's useful to have a netlink reply to be able to show this
    error when __netdev_update_features wasn't called, for example:

    1. ethtool -k eth0
    large-receive-offload: off
    2. ethtool -K eth0 rx-fcs on
    3. ethtool -K eth0 lro on
    Could not change any device features
    rx-lro: off [requested on]
    4. ethtool -K eth0 lro on
    # The output should be the same, but without this patch the kernel
    # doesn't send the reply, and ethtool is unable to detect the error.

    This commit makes ethtool-netlink always return a reply when requested,
    and it still avoids unnecessary calls to __netdev_update_features if the
    wanted features haven't changed.

    Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
    Signed-off-by: Maxim Mikityanskiy
    Reviewed-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Maxim Mikityanskiy
     
  • ethtool-netlink ignores dev->hw_features and may confuse the drivers by
    asking them to enable features not in the hw_features bitmask. For
    example:

    1. ethtool -k eth0
    tls-hw-tx-offload: off [fixed]
    2. ethtool -K eth0 tls-hw-tx-offload on
    tls-hw-tx-offload: on
    3. ethtool -k eth0
    tls-hw-tx-offload: on [fixed]

    Fitler out dev->hw_features from req_wanted to fix it and to resemble
    the legacy ethtool behavior.

    Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
    Signed-off-by: Maxim Mikityanskiy
    Reviewed-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Maxim Mikityanskiy
     
  • Currently, ethtool-netlink calculates new wanted bits as:
    (req_wanted & req_mask) | (old_active & ~req_mask)

    It completely discards the old wanted bits, so they are forgotten with
    the next ethtool command. Sample steps to reproduce:

    1. ethtool -k eth0
    tx-tcp-segmentation: on # TSO is on from the beginning
    2. ethtool -K eth0 tx off
    tx-tcp-segmentation: off [not requested]
    3. ethtool -k eth0
    tx-tcp-segmentation: off [requested on]
    4. ethtool -K eth0 rx off # Some change unrelated to TSO
    5. ethtool -k eth0
    tx-tcp-segmentation: off # "Wanted on" is forgotten

    This commit fixes it by changing the formula to:
    (req_wanted & req_mask) | (old_wanted & ~req_mask),
    where old_active was replaced by old_wanted to account for the wanted
    bits.

    The shortcut condition for the case where nothing was changed now
    compares wanted bitmasks, instead of wanted to active.

    Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
    Signed-off-by: Maxim Mikityanskiy
    Reviewed-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Maxim Mikityanskiy
     

04 Aug, 2020

3 commits

  • Saeed Mahameed says:

    ====================
    mlx5-updates-2020-08-03

    This patchset introduces some updates to mlx5 driver.

    1) Jakub converts mlx5 to use the new udp tunnel infrastructure.
    Starting with a hack to allow drivers to request a static configuration
    of the default vxlan port, and then a patch that converts mlx5.

    2) Parav implements change_carrier ndo for VF eswitch representors,
    to speedup link state control of representors netdevices.

    3) Alex Vesker, makes a simple update to software steering to fix an issue
    with push vlan action sequence

    4) Leon removes a redundant dump stack on error flow.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • info cannot be NULL here since its being accessed earlier
    in the function: nlmsg_parse(info->nlhdr...). Remove this
    redundant NULL check.

    Signed-off-by: Gaurav Singh
    Reviewed-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Gaurav Singh
     
  • mlx5 has the IANA VXLAN port (4789) hard coded by the device,
    instead of being added dynamically when tunnels are created.

    To support this add a workaround flag to struct udp_tunnel_nic_info.
    Skipping updates for the port is fairly trivial, dumping the hard
    coded port via ethtool requires some code duplication. The port
    is not a part of any real table, we dump it in a special table
    which has no tunnel types supported and only one entry.

    This is the last known workaround / hack needed to convert
    all drivers to the new infra.

    Signed-off-by: Jakub Kicinski
    Signed-off-by: Saeed Mahameed

    Jakub Kicinski
     

11 Jul, 2020

2 commits

  • All conflicts seemed rather trivial, with some guidance from
    Saeed Mameed on the tc_ct.c one.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add an interface to report offloaded UDP ports via ethtool netlink.

    Now that core takes care of tracking which UDP tunnel ports the NICs
    are aware of we can quite easily export this information out to
    user space.

    The responsibility of writing the netlink dumps is split between
    ethtool code and udp_tunnel_nic.c - since udp_tunnel module may
    not always be loaded, yet we should always report the capabilities
    of the NIC.

    $ ethtool --show-tunnels eth0
    Tunnel information for eth0:
    UDP port table 0:
    Size: 4
    Types: vxlan
    No entries
    UDP port table 1:
    Size: 4
    Types: geneve, vxlan-gpe
    Entries (1):
    port 1230, vxlan-gpe

    v4:
    - back to v2, build fix is now directly in udp_tunnel.h
    v3:
    - don't compile ETHTOOL_MSG_TUNNEL_INFO_GET in if CONFIG_INET
    not set.
    v2:
    - fix string set count,
    - reorder enums in the uAPI,
    - fix type of ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES to bitset
    in docs and comments.

    Signed-off-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Jakub Kicinski
     

10 Jul, 2020

1 commit

  • If the genlmsg_put() call in ethnl_default_dumpit() fails, we bail out
    without checking if we already have some messages in current skb like we do
    with ethnl_default_dump_one() failure later. Therefore if existing messages
    almost fill up the buffer so that there is not enough space even for
    netlink and genetlink header, we lose all prepared messages and return and
    error.

    Rather than duplicating the skb->len check, move the genlmsg_put(),
    genlmsg_cancel() and genlmsg_end() calls into ethnl_default_dump_one().
    This is also more logical as all message composition will be in
    ethnl_default_dump_one() and only iteration logic will be left in
    ethnl_default_dumpit().

    Fixes: 728480f12442 ("ethtool: default handlers for GET requests")
    Reported-by: Jakub Kicinski
    Signed-off-by: Michal Kubecek
    Reviewed-by: Jakub Kicinski
    Signed-off-by: David S. Miller

    Michal Kubecek
     

09 Jul, 2020

2 commits

  • Define 100G, 200G and 400G link modes using 100Gbps per lane

    LR, ER and FR are defined as a single link mode because they are
    using same technology and by design are fully interoperable.
    EEPROM content indicates if the module is LR, ER, or FR, and the
    user space ethtool decoder is planned to support decoding these
    modes in the EEPROM.

    Signed-off-by: Meir Lichtinger
    CC: Andrew Lunn
    Reviewed-by: Aya Levin
    Signed-off-by: Saeed Mahameed
    Signed-off-by: David S. Miller

    Meir Lichtinger
     
  • Now that we have moved the PHY ethtool statistics to be dynamically
    registered, we no longer need to inline those for ethtool. This used to
    be done to avoid cross symbol referencing and allow ethtool to be
    decoupled from PHYLIB entirely.

    Signed-off-by: Florian Fainelli
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Florian Fainelli
     

08 Jul, 2020

2 commits


30 Jun, 2020

1 commit

  • Currently, drivers can only tell whether the link is up/down using
    LINKSTATE_GET, but no additional information is given.

    Add attributes to LINKSTATE_GET command in order to allow drivers
    to expose the user more information in addition to link state to ease
    the debug process, for example, reason for link down state.

    Extended state consists of two attributes - link_ext_state and
    link_ext_substate. The idea is to avoid 'vendor specific' states in order
    to prevent drivers to use specific link_ext_state that can be in the future
    common link_ext_state.

    The substates allows drivers to add more information to the common
    link_ext_state. For example, vendor can expose 'Autoneg' as link_ext_state
    and add 'No partner detected during force mode' as link_ext_substate.

    If a driver cannot pinpoint the extended state with the substate
    accuracy, it is free to expose only the extended state and omit the
    substate attribute.

    Signed-off-by: Amit Cohen
    Reviewed-by: Jiri Pirko
    Reviewed-by: Petr Machata
    Signed-off-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Amit Cohen
     

26 Jun, 2020

2 commits