Skip to content
  1. Mar 15, 2020
    • Antoine Tenart's avatar
      net: phy: mscc: split the driver into separate files · fa164e40
      Antoine Tenart authored
      
      
      This patch splits the MSCC driver into separate files, per
      functionality, to improve readability and maintenance as the codebase
      grew a lot. The MACsec code is moved to a dedicated mscc_macsec.c file,
      the mscc.c file is renamed to mscc_main.c to keep the driver binary to
      be named mscc and common definition are put into a new mscc.h header.
      
      Most of the code was just moved around, except for a few exceptions:
      - Header inclusions were reworked to only keep what's needed.
      - Three helpers were created in the MACsec code, to avoid #ifdef's in
        the main C file: vsc8584_macsec_init, vsc8584_handle_macsec_interrupt
        and vsc8584_config_macsec_intr.
      
      The patch should not introduce any functional modification.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa164e40
    • Antoine Tenart's avatar
      net: phy: move the mscc driver to its own directory · da80aa52
      Antoine Tenart authored
      
      
      The MSCC PHY driver is growing, with lots of space consuming features
      (firmware support, full initialization, MACsec...). It's becoming hard
      to read and navigate in its source code. This patch moves the MSCC
      driver to its own directory, without modifying anything, as a
      preparation for splitting up its features into dedicated files.
      
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da80aa52
    • David S. Miller's avatar
      Merge branch 'RED-Introduce-an-ECN-tail-dropping-mode' · 3d572b23
      David S. Miller authored
      
      
      Petr Machata says:
      
      ====================
      RED: Introduce an ECN tail-dropping mode
      
      When the RED qdisc is currently configured to enable ECN, the RED algorithm
      is used to decide whether a certain SKB should be marked. If that SKB is
      not ECN-capable, it is early-dropped.
      
      It is also possible to keep all traffic in the queue, and just mark the
      ECN-capable subset of it, as appropriate under the RED algorithm. Some
      switches support this mode, and some installations make use of it.
      There is currently no way to put the RED qdiscs to this mode.
      
      Therefore this patchset adds a new RED flag, TC_RED_TAILDROP. When the
      qdisc is configured with this flag, non-ECT traffic is enqueued (and
      tail-dropped when the queue size is exhausted) instead of being
      early-dropped.
      
      Unfortunately, adding a new RED flag is not as simple as it sounds. RED
      flags are passed in tc_red_qopt.flags. However RED neglects to validate the
      flag field, and just copies it over wholesale to its internal structure,
      and later dumps it back.
      
      A broken userspace can therefore configure a RED qdisc with arbitrary
      unsupported flags, and later expect to see the flags on qdisc dump. The
      current ABI thus allows storage of 5 bits of custom data along with the
      qdisc instance.
      
      GRED, SFQ and CHOKE qdiscs are in the same situation. (GRED validates VQ
      flags, but not the flags for the main queue.) E.g. if SFQ ever needs to
      support TC_RED_ADAPTATIVE, it needs another way of doing it, and at the
      same time it needs to retain the possibility to store 6 bits of
      uninterpreted data.
      
      For RED, this problem is resolved in patch #2, which adds a new attribute,
      and a way to separate flags from userbits that can be reused by other
      qdiscs. The flag itself and related behavioral changes are added in patch
      
      To test the new feature, patch #1 first introduces a TDC testsuite that
      covers the existing RED flags. Patch #5 later extends it with taildrop
      coverage. Patch #6 contains a forwarding selftest for the offloaded
      datapath.
      
      To test the SW datapath, I took the mlxsw selftest and adapted it in mostly
      obvious ways. The test is stable enough to verify that RED, ECN and ECN
      taildrop actually work. However, I have no confidence in its portability to
      other people's machines or mildly different configurations. I therefore do
      not find it suitable for upstreaming.
      
      GRED and CHOKE can use the same method as RED if they ever need to support
      extra flags. SFQ uses the length of TCA_OPTIONS to dispatch on binary
      control structure version, and would therefore need a different approach.
      
      v2:
      - Patch #1
          - Require nsPlugin in each RED test
          - Match end-of-line to catch cases of more flags reported than
            requested
      - Patch #2:
          - Replaced with another patch.
      - Patch #3:
          - Fix red_use_taildrop() condition in red_enqueue switch for
            probabilistic case.
      - Patch #5:
          - Require nsPlugin in each RED test
          - Match end-of-line to catch cases of more flags reported than
            requested
          - Add a test for creation of non-ECN taildrop, which should fail
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d572b23
    • Petr Machata's avatar
      selftests: mlxsw: RED: Test RED ECN nodrop offload · 63f3c1d0
      Petr Machata authored
      
      
      Extend RED testsuite to cover the new nodrop mode of RED-ECN. This test is
      really similar to ECN test, diverging only in the last step, where UDP
      traffic should go to backlog instead of being dropped. Thus extract a
      common helper, ecn_test_common(), make do_ecn_test() into a relatively
      simple wrapper, and add another one, do_ecn_nodrop_test().
      
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63f3c1d0
    • Petr Machata's avatar
      selftests: qdiscs: RED: Add nodrop tests · 058e56ac
      Petr Machata authored
      
      
      Add tests for the new "nodrop" flag.
      
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      058e56ac
    • Petr Machata's avatar
      mlxsw: spectrum_qdisc: Offload RED ECN nodrop mode · 8040c96b
      Petr Machata authored
      
      
      RED ECN nodrop mode means that non-ECT traffic should not be early-dropped,
      but enqueued normally instead. In Spectrum systems, this is achieved by
      disabling CWTPM.ew (enable WRED) for a given traffic class.
      
      So far CWTPM.ew was unconditionally enabled. Instead disable it when the
      RED qdisc is in nodrop mode.
      
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8040c96b
    • Petr Machata's avatar
      net: sched: RED: Introduce an ECN nodrop mode · 0a7fad23
      Petr Machata authored
      
      
      When the RED Qdisc is currently configured to enable ECN, the RED algorithm
      is used to decide whether a certain SKB should be marked. If that SKB is
      not ECN-capable, it is early-dropped.
      
      It is also possible to keep all traffic in the queue, and just mark the
      ECN-capable subset of it, as appropriate under the RED algorithm. Some
      switches support this mode, and some installations make use of it.
      
      To that end, add a new RED flag, TC_RED_NODROP. When the Qdisc is
      configured with this flag, non-ECT traffic is enqueued instead of being
      early-dropped.
      
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a7fad23
    • Petr Machata's avatar
      net: sched: Allow extending set of supported RED flags · 14bc175d
      Petr Machata authored
      
      
      The qdiscs RED, GRED, SFQ and CHOKE use different subsets of the same pool
      of global RED flags. These are passed in tc_red_qopt.flags. However none of
      these qdiscs validate the flag field, and just copy it over wholesale to
      internal structures, and later dump it back. (An exception is GRED, which
      does validate for VQs -- however not for the main setup.)
      
      A broken userspace can therefore configure a qdisc with arbitrary
      unsupported flags, and later expect to see the flags on qdisc dump. The
      current ABI therefore allows storage of several bits of custom data to
      qdisc instances of the types mentioned above. How many bits, depends on
      which flags are meaningful for the qdisc in question. E.g. SFQ recognizes
      flags ECN and HARDDROP, and the rest is not interpreted.
      
      If SFQ ever needs to support ADAPTATIVE, it needs another way of doing it,
      and at the same time it needs to retain the possibility to store 6 bits of
      uninterpreted data. Likewise RED, which adds a new flag later in this
      patchset.
      
      To that end, this patch adds a new function, red_get_flags(), to split the
      passed flags of RED-like qdiscs to flags and user bits, and
      red_validate_flags() to validate the resulting configuration. It further
      adds a new attribute, TCA_RED_FLAGS, to pass arbitrary flags.
      
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14bc175d
    • Petr Machata's avatar
      selftests: qdiscs: Add TDC test for RED · 10ef49bd
      Petr Machata authored
      
      
      Add a handful of tests for creating RED with different flags.
      
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarRoman Mashak <mrv@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10ef49bd
    • Edward Cree's avatar
      sfc: support configuring vf spoofchk on EF10 VFs · 085793f0
      Edward Cree authored
      
      
      Corresponds to the MAC_SPOOFING_TX privilege in the hardware.
      Some firmware versions on some cards don't support the feature, so check
       the TX_MAC_SECURITY capability and fail EOPNOTSUPP if trying to enable
       spoofchk on a NIC that doesn't support it.
      
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      085793f0
    • David S. Miller's avatar
      Merge branch 'net-phy-XLGMII-define-and-usage-in-PHYLINK' · fa83820e
      David S. Miller authored
      
      
      Jose Abreu says:
      
      ====================
      net: phy: XLGMII define and usage in PHYLINK
      
      Adds XLGMII defines and usage in PHYLINK.
      
      Patch 1/2, adds the define for it, whilst 2/2 adds the usage of it in
      PHYLINK.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa83820e
    • Jose Abreu's avatar
      net: phylink: Add XLGMII support · 1671c42d
      Jose Abreu authored
      
      
      Add XLGMII interface and the list of XLGMII speeds to PHYLINK.
      
      Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1671c42d
    • Jose Abreu's avatar
      net: phy: Add XLGMII interface define · 58b05e58
      Jose Abreu authored
      
      
      Add a define for XLGMII interface.
      
      Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      58b05e58
    • Colin Ian King's avatar
      net: ena: ethtool: clean up minor indentation issue · f1dc7460
      Colin Ian King authored
      
      
      There is a statement that is indented incorrectly, remove a space.
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1dc7460
    • Vladimir Oltean's avatar
      net: dsa: sja1105: move MAC configuration to .phylink_mac_link_up · ec8582d1
      Vladimir Oltean authored
      
      
      The switches supported so far by the driver only have non-SerDes ports,
      so they should be configured in the PHYLINK callback that provides the
      resolved PHY link parameters.
      
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec8582d1
    • Shahjada Abul Husain's avatar
      cxgb4: update T5/T6 adapter register ranges · 724d0215
      Shahjada Abul Husain authored
      
      
      Add more T5/T6 registers to be collected in register dump:
      
      1. MPS register range 0x9810 to 0x9864 and 0xd000 to 0xd004.
      2. NCSI register range 0x1a114 to 0x1a130 and 0x1a138 to 0x1a1c4.
      
      Signed-off-by: default avatarShahjada Abul Husain <shahjada@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      724d0215
  2. Mar 14, 2020