1. 21 Jul, 2021 5 commits
    • Justin Iurman's avatar
      uapi: IPv6 IOAM headers definition · db67f219
      Justin Iurman authored
      This patch provides the IPv6 IOAM option header [1] as well as the IOAM
      Trace header [2]. An IOAM option must be 4n-aligned. Here is an overview of
      a Hop-by-Hop with an IOAM Trace option:
      
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Next header  |  Hdr Ext Len  |    Padding    |    Padding    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Option Type  |  Opt Data Len |    Reserved   |   IOAM Type   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |         Namespace-ID          | NodeLen | Flags | RemainingLen|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                IOAM-Trace-Type                |    Reserved   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
      |                                                               |  |
      |                         node data [n]                         |  |
      |                                                               |  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  D
      |                                                               |  a
      |                         node data [n-1]                       |  t
      |                                                               |  a
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ~                             ...                               ~  S
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  p
      |                                                               |  a
      |                         node data [1]                         |  c
      |                                                               |  e
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
      |                                                               |  |
      |                         node data [0]                         |  |
      |                                                               |  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
      
      The IOAM option header starts at "Option Type" and ends after "IOAM
      Type". The IOAM Trace header starts at "Namespace-ID" and ends after
      "IOAM-Trace-Type/Reserved".
      
      IOAM Type: either Pre-allocated Trace (=0), Incremental Trace (=1),
      Proof-of-Transit (=2) or Edge-to-Edge (=3). Note that both the
      Pre-allocated Trace and the Incremental Trace look the same. The two
      others are not implemented.
      
      Namespace-ID: IOAM namespace identifier, not to be confused with network
      namespaces. It adds further context to IOAM options and associated data,
      and allows devices which are IOAM capable to determine whether IOAM
      options must be processed or ignored. It can also be used by an operator
      to distinguish different operational domains or to identify different
      sets of devices.
      
      NodeLen: Length of data added by each node. It depends on the Trace
      Type.
      
      Flags: Only the Overflow (O) flag for now. The O flag is set by a
      transit node when there are not enough octets left to record its data.
      
      RemainingLen: Remaining free space to record data.
      
      IOAM-Trace-Type: Bit field where each bit corresponds to a specific kind
      of IOAM data. See [2] for a detailed list.
      
        [1] https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options
        [2] https://tools.ietf.org/html/draft-ietf-ippm-ioam-dataSigned-off-by: default avatarJustin Iurman <justin.iurman@uliege.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db67f219
    • Vladimir Oltean's avatar
      net: switchdev: recurse into __switchdev_handle_fdb_del_to_device · 71f4f89a
      Vladimir Oltean authored
      The difference between __switchdev_handle_fdb_del_to_device and
      switchdev_handle_del_to_device is that the former takes an extra
      orig_dev argument, while the latter starts with dev == orig_dev.
      
      We should recurse into the variant that does not lose the orig_dev along
      the way. This is relevant when deleting FDB entries pointing towards a
      bridge (dev changes to the lower interfaces, but orig_dev shouldn't).
      
      The addition helper already recurses properly, just the deletion one
      doesn't.
      
      Fixes: 8ca07176 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71f4f89a
    • Vladimir Oltean's avatar
      net: switchdev: remove stray semicolon in switchdev_handle_fdb_del_to_device shim · 94111dfc
      Vladimir Oltean authored
      With the semicolon at the end, the compiler sees the shim function as a
      declaration and not as a definition, and warns:
      
      'switchdev_handle_fdb_del_to_device' declared 'static' but never defined
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Fixes: 8ca07176 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Tested-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94111dfc
    • Vladimir Oltean's avatar
      net: phy: at803x: finish the phy id checking simplification · f5621a01
      Vladimir Oltean authored
      The blamed commit was probably not tested on net-next, since it did not
      refactor the extra phy id check introduced in commit b856150c ("net:
      phy: at803x: mask 1000 Base-X link mode").
      
      Fixes: 8887ca54 ("net: phy: at803x: simplify custom phy id matching")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5621a01
    • Russell King (Oracle)'s avatar
      net: phylink: cleanup ksettings_set · 7cefb0b0
      Russell King (Oracle) authored
      We only need to fiddle about with the supported mask after we have
      validated the user's requested parameters. Simplify and streamline the
      code by moving the linkmode copy and update of the autoneg bit after
      validating the user's request.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cefb0b0
  2. 20 Jul, 2021 35 commits