1. 19 1月, 2020 9 次提交
    • A
      devlink: Add non-routable packet trap · 95f0ead8
      Amit Cohen 提交于
      Add packet trap that can report packets that reached the router, but are
      non-routable. For example, IGMP queries can be flooded by the device in
      layer 2 and reach the router. Such packets should not be routed and
      instead dropped.
      Signed-off-by: NAmit Cohen <amitc@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95f0ead8
    • A
      selftests: devlink_trap_l3_drops: Add test cases of irif and erif disabled · 740e87bc
      Amit Cohen 提交于
      Add test cases to check that packets routed through disabled RIFs and
      packets routed from disabled RIFs are dropped and devlink counters
      increase when the action is trap.
      Signed-off-by: NAmit Cohen <amitc@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      740e87bc
    • A
      mlxsw: Add irif and erif disabled traps · 5b051621
      Amit Cohen 提交于
      IRIF_DISABLED and ERIF_DISABLED are driver specific traps. Packets are
      dropped for these reasons when they need to be routed through/from
      existing router interfaces (RIF) which are disabled.
      
      Add devlink driver-specific traps and mlxsw trap IDs used to report
      these traps.
      Signed-off-by: NAmit Cohen <amitc@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b051621
    • D
      Merge branch 'for-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 95ae2d1d
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ====================
      Mellanox, mlx5 E-Switch chains and prios
      
      This series has two parts,
      
      1) A merge commit with mlx5-next branch that include updates for mlx5
      HW layouts needed for this and upcoming submissions.
      
      2) From Paul, Increase the number of chains and prios
      
      Currently the Mellanox driver supports offloading tc rules that
      are defined on the first 4 chains and the first 16 priorities.
      The restriction stems from the firmware flow level enforcement
      requiring a flow table of a certain level to point to a flow
      table of a higher level. This limitation may be ignored by setting
      the ignore_flow_level bit when creating flow table entries.
      Use unmanaged tables and ignore flow level to create more tables than
      declared by fs_core steering. Manually manage the connections between the
      tables themselves.
      
      HW table is instantiated for every tc <chain,prio> tuple. The miss rule
      of every table either jumps to the next <chain,prio> table, or continues
      to slow_fdb. This logic is realized by following this sequence:
      
      1. Create an auto-grouped flow table for the specified priority with
          reserved entries
      
      Reserved entries are allocated at the end of the flow table.
      Flow groups are evaluated in sequence and therefore it is guaranteed
      that the flow group defined on the last FTEs will be the last to evaluate.
      
      Define a "match all" flow group on the reserved entries, providing
      the platform to add table miss actions.
      
      2. Set the miss rule action to jump to the next <chain,prio> table
          or the slow_fdb.
      
      3. Link the previous priority table to point to the new table by
          updating its miss rule.
      
      Please pull and let me know if there's any problem.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95ae2d1d
    • D
      net: phy: adin: fix a warning about msleep · 0c58ac1e
      Dejin Zheng 提交于
      found a warning by the following command:
      ./scripts/checkpatch.pl -f drivers/net/phy/adin.c
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst
       #628: FILE: drivers/net/phy/adin.c:628:
      +	msleep(10);
      Signed-off-by: NDejin Zheng <zhengdejin5@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c58ac1e
    • D
      Merge branch 'Rate-adaptation-for-Felix-DSA-switch' · d82f2872
      David S. Miller 提交于
      Vladimir Oltean says:
      
      ====================
      Rate adaptation for Felix DSA switch
      
      When operating the MAC at 2.5Gbps (2500Base-X and USXGMII/QSXGMII) and
      in combination with certain PHYs, it is possible that the copper side
      may operate at lower link speeds. In this case, it is the PHY who has a
      MAC inside of it that emits pause frames towards the switch's MAC,
      telling it to slow down so that the transmission is lossless.
      
      These patches are the support needed for the switch side of things to
      work.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d82f2872
    • A
      net: dsa: felix: Allow PHY to AN 10/100/1000 with 2500 serdes link · 74984a19
      Alex Marginean 提交于
      If the serdes link is set to 2500 using interfce type 2500base-X, lower
      link speeds over on the line side should still be supported.
      Rate adaptation is done out of band, in our case using AQR PHYs this is
      done using flow control.
      Signed-off-by: NAlex Marginean <alexandru.marginean@nxp.com>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74984a19
    • A
      net: dsa: felix: Handle PAUSE RX regardless of AN result · f3660937
      Alex Marginean 提交于
      Flow control is used with 2500Base-X and AQR PHYs to do rate adaptation
      between line side 100/1000 links and MAC running at 2.5G.
      
      This is independent of the flow control configuration settled on line
      side though AN.
      
      In general, allowing the MAC to handle flow control even if not
      negotiated with the link partner should not be a problem, so the patch
      just enables it in all cases.
      Signed-off-by: NAlex Marginean <alexandru.marginean@nxp.com>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3660937
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 7f013ede
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next, they are:
      
      1) Incorrect uapi header comment in bitwise, from Jeremy Sowden.
      
      2) Fetch flow statistics if flow is still active.
      
      3) Restrict flow matching on hardware based on input device.
      
      4) Add nf_flow_offload_work_alloc() helper function.
      
      5) Remove the last client of the FLOW_OFFLOAD_DYING flag, use teardown
         instead.
      
      6) Use atomic bitwise operation to operate with flow flags.
      
      7) Add nf_flowtable_hw_offload() helper function to check for the
         NF_FLOWTABLE_HW_OFFLOAD flag.
      
      8) Add NF_FLOW_HW_REFRESH to retry hardware offload from the flowtable
         software datapath.
      
      9) Remove indirect calls in xt_hashlimit, from Florian Westphal.
      
      10) Add nf_flow_offload_tuple() helper to consolidate code.
      
      11) Add nf_flow_table_offload_cmd() helper function.
      
      12) A few whitespace cleanups in nf_tables in bitwise and the bitmap/hash
          set types, from Jeremy Sowden.
      
      13) Cleanup netlink attribute checks in bitwise, from Jeremy Sowden.
      
      14) Replace goto by return in error path of nft_bitwise_dump(), from
          Jeremy Sowden.
      
      15) Add bitwise operation netlink attribute, also from Jeremy.
      
      16) Add nft_bitwise_init_bool(), from Jeremy Sowden.
      
      17) Add nft_bitwise_eval_bool(), also from Jeremy.
      
      18) Add nft_bitwise_dump_bool(), from Jeremy Sowden.
      
      19) Disallow hardware offload for other that NFT_BITWISE_BOOL,
          from Jeremy Sowden.
      
      20) Add NFTA_BITWISE_DATA netlink attribute, again from Jeremy.
      
      21) Add support for bitwise shift operation, from Jeremy Sowden.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f013ede
  2. 18 1月, 2020 10 次提交
  3. 17 1月, 2020 21 次提交