1. 12 Oct, 2020 12 commits
  2. 11 Oct, 2020 9 commits
    • Jakub Kicinski's avatar
      Merge branch 'Offload-tc-vlan-mangle-to-mscc_ocelot-switch' · bc081a69
      Jakub Kicinski authored
      Vladimir Oltean says:
      
      ====================
      Offload tc-vlan mangle to mscc_ocelot switch
      
      This series offloads one more action to the VCAP IS1 ingress TCAM, which
      is to change the classified VLAN for packets, according to the VCAP IS1
      keys (VLAN, source MAC, source IP, EtherType, etc).
      ====================
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bc081a69
    • Vladimir Oltean's avatar
      selftests: net: mscc: ocelot: add test for VLAN modify action · 82c200be
      Vladimir Oltean authored
      Create a test that changes a VLAN ID from 200 to 300.
      
      We also need to modify the preferences of the filters installed for the
      other rules so that they are unique, because we now install the "tc-vlan
      modify" filter in VCAP IS1 only temporarily, and we need to perform the
      deletion by filter preference number.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      82c200be
    • Vladimir Oltean's avatar
      net: dsa: tag_ocelot: use VLAN information from tagging header when available · ea440cd2
      Vladimir Oltean authored
      When the Extraction Frame Header contains a valid classified VLAN, use
      that instead of the VLAN header present in the packet.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ea440cd2
    • Vladimir Oltean's avatar
      net: mscc: ocelot: offload VLAN mangle action to VCAP IS1 · 70edfae1
      Vladimir Oltean authored
      The VCAP_IS1_ACT_VID_REPLACE_ENA action, from the VCAP IS1 ingress TCAM,
      changes the classified VLAN.
      
      We are only exposing this ability for switch ports that are under VLAN
      aware bridges. This is because in standalone ports mode and under a
      bridge with vlan_filtering=0, the ocelot driver configures the switch to
      operate as VLAN-unaware, so the classified VLAN is not derived from the
      802.1Q header from the packet, but instead is always equal to the
      port-based VLAN ID of the ingress port. We _can_ still change the
      classified VLAN for packets when operating in this mode, but the end
      result will most likely be a drop, since both the ingress and the egress
      port need to be members of the modified VLAN. And even if we install the
      new classified VLAN into the VLAN table of the switch, the result would
      still not be as expected: we wouldn't see, on the output port, the
      modified VLAN tag, but the original one, even though the classified VLAN
      was indeed modified. This is because of how the hardware works: on
      egress, what is pushed to the frame is a "port tag", which gives us the
      following options:
      
      - Tag all frames with port tag (derived from the classified VLAN)
      - Tag all frames with port tag, except if the classified VLAN is 0 or
        equal to the native VLAN of the egress port
      - No port tag
      
      Needless to say, in VLAN-unaware mode we are disabling the port tag.
      Otherwise, the existing VLAN tag would be ignored, and a second VLAN
      tag (the port tag), holding the classified VLAN, would be pushed
      (instead of replacing the existing 802.1Q tag). This is definitely not
      what the user wanted when installing a "vlan modify" action.
      
      So it is simply not worth bothering with VLAN modify rules under other
      configurations except when the ports are fully VLAN-aware.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      70edfae1
    • Jakub Kicinski's avatar
      Merge branch 'enetc-Migrate-to-PHYLINK-and-PCS_LYNX' · bea4b309
      Jakub Kicinski authored
      Claudiu Manoil says:
      
      ====================
      enetc: Migrate to PHYLINK and PCS_LYNX
      
      Transitioning the enetc driver from phylib to phylink.
      Offloading the serdes configuration to the PCS_LYNX
      module is a mandatory part of this transition. Aiming
      for a cleaner, more maintainable design, and better
      code reuse.
      The first 2 patches are clean up prerequisites.
      
      Tested on a p1028rdb board.
      
      v2: validate() explicitly rejects now all interface modes not
      supported by the driver instead of relying on the device tree
      to provide only supported interfaces, and dropped redundant
      activation of pcs_poll (addressing Ioana's findings)
      ====================
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bea4b309
    • Claudiu Manoil's avatar
      enetc: Migrate to PHYLINK and PCS_LYNX · 71b77a7a
      Claudiu Manoil authored
      This is a methodical transition of the driver from phylib
      to phylink, following the guidelines from sfp-phylink.rst.
      The MAC register configurations based on interface mode
      were moved from the probing path to the mac_config() hook.
      MAC enable and disable commands (enabling Rx and Tx paths
      at MAC level) were also extracted and assigned to their
      corresponding phylink hooks.
      As part of the migration to phylink, the serdes configuration
      from the driver was offloaded to the PCS_LYNX module,
      introduced in commit 0da4c3d3 ("net: phy: add Lynx PCS module"),
      the PCS_LYNX module being a mandatory component required to
      make the enetc driver work with phylink.
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Reviewed-by: default avatarIoana Ciornei <ioana.cionei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      71b77a7a
    • Claudiu Manoil's avatar
      arm64: dts: fsl-ls1028a-rdb: Specify in-band mode for ENETC port 0 · 9fce74bf
      Claudiu Manoil authored
      As part of the transition of the enetc ethernet driver from phylib
      to phylink, the in-band operation mode of the SGMII interface
      from enetc port 0 needs to be specified explicitly for phylink.
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9fce74bf
    • Claudiu Manoil's avatar
      enetc: Clean up serdes configuration · 46456ccf
      Claudiu Manoil authored
      Decouple internal mdio bus creation from serdes
      configuration, as a prerequisite to offloading
      serdes configuration to a different module.
      Group together mdio bus creation routines, cleanup.
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      46456ccf
    • Claudiu Manoil's avatar
      enetc: Clean up MAC and link configuration · 08f90fc9
      Claudiu Manoil authored
      Decouple level MAC configuration based on phy interface type
      from general port configuration.
      Group together MAC and link configuration code.
      Decouple external mdio bus creation from interface type
      parsing.  No longer return an (unhandled) error code when
      phy_node not found, use phy_node to indicate whether the
      port has a phy or not.  No longer fall-through when serdes
      configuration fails for the link modes that require
      internal link configuration.
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      08f90fc9
  3. 10 Oct, 2020 17 commits
  4. 09 Oct, 2020 2 commits