1. 28 Feb, 2018 15 commits
    • Maxime Chevallier's avatar
      net: mvpp2: Add hardware offloading for VLAN filtering · 56beda3d
      Maxime Chevallier authored
      Marvell PPv2 controller allows for generic packet filtering. This commit
      adds entries to implement VLAN filtering. The approach taken is :
      
       - Filter entries that would match on the presence of the VLAN tag
         (existing VLAN detection, DSA / EDSA detection) will set the next
         lookup ID to be for the VID.
      
       - For each VLAN existing on a given port, we add an entry that matches
         this specific VID. If the incoming packet matches the VID entry, it is
         set for the next lookup in the chain (LU_L2).
      
       - A Guard entry is added for each port, that will match if the incoming
         packet didn't match any of the above VID entries. This entry tags the
         packet to be dropped.
      
      Due to this design, and the fact that the total 256 filter entries are
      also used for other purposes, we have a limit of 10 VLANs per port. To
      accommodate the case where we would need more VLANS on one port, this
      patch implements the ndo_set_features to allow for disabling of VLAN
      filtering using ethtool.
      
      The default config has VLAN filtering disabled.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56beda3d
    • Heiner Kallweit's avatar
      r8169: convert remaining feature flag and remove enum features · 14967f94
      Heiner Kallweit authored
      Now that only one feature flag is left we can convert it and remove
      enum features.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14967f94
    • David S. Miller's avatar
      Merge branch 'macmace-cleanups' · 64ec1acd
      David S. Miller authored
      Finn Thain says:
      
      ====================
      Fixes, cleanup and modernization for macmace driver
      
      Changes since v4 of combined patch series:
      - Removed redundant and non-portable MACH_IS_MAC tests.
      - Omitted patches unrelated to macmace driver.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64ec1acd
    • Finn Thain's avatar
      net/macmace: Drop redundant MACH_IS_MAC test · 1e9b9a8b
      Finn Thain authored
      The MACH_IS_MAC test is redundant here because the platform device
      won't get registered unless MACH_IS_MAC.
      Adopt module_platform_driver() convention.
      
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e9b9a8b
    • Finn Thain's avatar
      net/macmace: Fix and clean up log messages · 66e19689
      Finn Thain authored
      Don't log the unexpanded "eth%d" format string.
      Log the chip revision in the probe message (consistent with mace.c).
      Drop redundant debug messages for FIFO events recorded in the
      interface statistics (also consistent with mace.c).
      Tested-by: default avatarStan Johnson <userm57@yahoo.com>
      Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66e19689
    • Stephen Hemminger's avatar
      inet: whitespace cleanup · 82695b30
      Stephen Hemminger authored
      Ran simple script to find/remove trailing whitespace and blank lines
      at EOF because that kind of stuff git whines about and editors leave
      behind.
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82695b30
    • Hernán Gonzalez's avatar
      emulex/benet: Constify *be_misconfig_evt_port_state[] · 262c9740
      Hernán Gonzalez authored
      Note: This is compile only tested as I have no access to the hw.
      No benefit gained except for some self-documenting.
      
      add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
      Function                                     old     new   delta
      Total: Before=2757703, After=2757703, chg +0.00%
      Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      262c9740
    • Hernán Gonzalez's avatar
      qlogic/qed: Constify *pkt_type_str[] · 4f4aaa17
      Hernán Gonzalez authored
      Note: This is compile only tested as I have no access to the hw.
      Constifying and declaring as static saves 24 bytes.
      
      add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24)
      Function                                     old     new   delta
      pkt_type_str                                  24       -     -24
      Total: Before=3599256, After=3599232, chg -0.00%
      Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
      Acked-by: default avatarMichal Kalderon <michal.kalderon@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f4aaa17
    • David S. Miller's avatar
      Merge branch 'SFP-updates' · 2824db74
      David S. Miller authored
      Russell King says:
      
      ====================
      SFP updates
      
      Included in this series are a further few updates for SFP support:
      
      - Adding support for Fiberstore's non-standard BiDi modules operating
        at 1310nm/1550nm wavelengths rather than the 1000BASE-BX standard of
        1310nm/1490nm.
      - Adding support for negotiating the PHY interface mode with the MAC,
        so that modules supporting faster speeds and Gigabit ethernet work
        with Gigabit-only MACs.
      - Adding support for high power (>1W) SFP modules.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2824db74
    • Jon Nettleton's avatar
      sfp: add high power module support · 3bb35261
      Jon Nettleton authored
      This patch is the result of work by both Jon Nettleton and Russell King.
      Jon wrote the original patch, adding support for SFP modules which
      require a power level greater than '1'.
      
      Russell's changes:
      - Fix the power levels for big-endian, and make the code flow better.
      - Convert to use device_property_read_u8()
      - Warn for power levels exceeding host level
        SFF-8431 says:
      
        "To avoid exceeding system power supply limits and cooling capacity,
         all modules at power up by default shall operate with up to 1.0 W.
         Hosts supporting Power Level II or III operation may enable a Power
         Level II or III module through the 2-wire interface. Power Level II
         or III modules shall assert the power level declaration bit of
         SFF-8472."
      
        Print a warning for modules that exceed the host power level, and
        leave them operating in power level 1.
      
      - Fix i2c write
        The first byte of any write after the bus address is always the
        device address.  In order to write a value to device D, address I,
        value V, we need to generate on the bus:
      
          S DDDDDDDD A IIIIIIII A VVVVVVVV A P
      
        where S = start, R = restart, A = ack, P = stop.  Splitting this
        as two:
      
          S DDDDDDDD A IIIIIIII A R DDDDDDDD A VVVVVVVV A P
      
        results in the device's address register being written first by I
        and then by V - the addressed register within the device is not
        written.
      
      - Avoid power mode switching if 0xa2 is not implemented
        Some modules indicate that they support power level II or power level
        III, but do not implement address 0xa2, meaning that the bit to set
        them to high power mode is not accessible.
      
        These modules appear to have the sff8472_compliance field set to zero,
        and also do not implement diagnostics.  Detect this, but also ensure
        that the module does not require the address switching mode, which we
        do not implement.
      
      - Use mW for power level rather than power level number.
      
      - Fix high power mode transition
        We must not switch to SFP_MOD_PRESENT state until we have finished
        initialising, because the remaining state machines check for that
        state.  Add SFP_MOD_HPOWER as an intermediate state.
      
      - Use definition for I2C register address rather than constant.
      Signed-off-by: default avatarJon Nettleton <jon@solid-run.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3bb35261
    • Russell King's avatar
      dt-bindings: add maximum power level to SFP binding · 66f5325c
      Russell King authored
      Add the new maximum power level property to the SFP binding.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66f5325c
    • Russell King's avatar
      phylink,sfp: negotiate interface format with MAC · a9c79364
      Russell King authored
      Negotiate the interface format with the MAC rather than requiring it to
      be a fixed type specified solely by the SFP module.  This allows modules
      that can work with several different interface signalling formats to
      select a format compatible with the MAC - for example, a Fiber module
      supporing Gigabit ethernet and faster connected to a Gigabit only MAC
      needs to select the 1000BASE-X mode.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9c79364
    • Russell King's avatar
      sfp: support 1G BiDi (eg, FiberStore SFP-GE-BX) modules · 03145864
      Russell King authored
      Some BiDi modules (eg, FiberStore SFP-GE-BX) are not compliant with
      1000BASE-BX as they use different wavelengths from the 1000BASE-BX
      standard (eg, 1310nm/1550nm rather than 1310nm/1490nm).  These modules
      support 1000BASE-X ethernet, so detect them by a failure to find any
      other support, the 8B10B encoding and a bit rate that falls within the
      1Gbps window.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03145864
    • Ido Schimmel's avatar
      team: Use extack to report enslavement failures · 44d15d93
      Ido Schimmel authored
      Use extack inside team's enslavement function and also propagate it to
      the netdevice notifier to allow enslaved ports to report the failure
      reason. Example:
      
      $ teamd -t team0 -d -c '{"runner": {"name": "lacp"}}'
      $ ip link set dev lo master team0
      Error: Loopback device can't be added as a team port.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44d15d93
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2018-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux · fb66cb07
      David S. Miller authored
      Saeed Mahameed says:
      
      mlx5-update-2018-02-23 (IB representors)
      
      From: Mark Bloch <markb@mellanox.com>
      =========
      Add IB representor when in switchdev mode
      
      The following series adds support for an IB (RAW Ethernet only) device
      representor which is created when the user switches to switchdev mode.
      
      Today when switching to switchdev mode the only representors which are
      created are net devices. Each netdev is a representor of a virtual
      function and any data sent via the representor is received on the virtual
      function, and any data sent via the virtual function is received by the
      representor.
      
      For the mlx5 driver the main use of this functionality is to be able to
      use Open vSwitch on the hypervisor in order to manage/control traffic
      from/to the virtual functions. Open vSwitch can also work with  DPDK
      devices and not just net devices, this series exposes an IB device, which
      Mellanox PMD driver uses, which then can be used by Open vSwitch DPDK.
      
      An IB device representor exposes only RAW Ethernet QP capabilities and
      the ability to create flow rules to direct traffic to its RX queues. The
      state of the IB device (ACTIVE/DOWN etc..) is based on the state of the
      corresponding net device representor. No other RDMA/RoCE functionality is
      currently supported and no GID table is exposed.
      =========
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb66cb07
  2. 27 Feb, 2018 25 commits