1. 15 2月, 2021 13 次提交
  2. 14 2月, 2021 12 次提交
  3. 13 2月, 2021 15 次提交
    • D
      Merge branch 'Xilinx-axienet-updates' · 773dc50d
      David S. Miller 提交于
      Robert Hancock says:
      
      ====================
      Xilinx axienet updates
      
      Updates to the Xilinx AXI Ethernet driver to add support for an additional
      ethtool operation, and to support dynamic switching between 1000BaseX and
      SGMII interface modes.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      773dc50d
    • R
      net: axienet: Support dynamic switching between 1000BaseX and SGMII · 6c8f06bb
      Robert Hancock 提交于
      Newer versions of the Xilinx AXI Ethernet core (specifically version 7.2 or
      later) allow the core to be configured with a PHY interface mode of "Both",
      allowing either 1000BaseX or SGMII modes to be selected at runtime. Add
      support for this in the driver to allow better support for applications
      which can use both fiber and copper SFP modules.
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c8f06bb
    • R
      dt-bindings: net: xilinx_axienet: add xlnx,switch-x-sgmii attribute · eceac9d2
      Robert Hancock 提交于
      Document the new xlnx,switch-x-sgmii attribute which is used to indicate
      that the Ethernet core supports dynamic switching between 1000BaseX and
      SGMII.
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eceac9d2
    • R
      net: axienet: hook up nway_reset ethtool operation · 66b51663
      Robert Hancock 提交于
      Hook up the nway_reset ethtool operation to the corresponding phylink
      function so that "ethtool -r" can be supported.
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      66b51663
    • D
      Merge branch 'tcp-mem-pressure-vs-SO_RCVLOWAT' · 762d17b9
      David S. Miller 提交于
      Eric Dumazet says:
      
      ====================
      tcp: mem pressure vs SO_RCVLOWAT
      
      First patch fixes an issue for applications using SO_RCVLOWAT
      to reduce context switches.
      
      Second patch is a cleanup.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      762d17b9
    • E
      tcp: factorize logic into tcp_epollin_ready() · 05dc72ab
      Eric Dumazet 提交于
      Both tcp_data_ready() and tcp_stream_is_readable() share the same logic.
      
      Add tcp_epollin_ready() helper to avoid duplication.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Arjun Roy <arjunroy@google.com>
      Cc: Wei Wang <weiwan@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05dc72ab
    • E
      tcp: fix SO_RCVLOWAT related hangs under mem pressure · f969dc5a
      Eric Dumazet 提交于
      While commit 24adbc16 ("tcp: fix SO_RCVLOWAT hangs with fat skbs")
      fixed an issue vs too small sk_rcvbuf for given sk_rcvlowat constraint,
      it missed to address issue caused by memory pressure.
      
      1) If we are under memory pressure and socket receive queue is empty.
      First incoming packet is allowed to be queued, after commit
      76dfa608 ("tcp: allow one skb to be received per socket under memory pressure")
      
      But we do not send EPOLLIN yet, in case tcp_data_ready() sees sk_rcvlowat
      is bigger than skb length.
      
      2) Then, when next packet comes, it is dropped, and we directly
      call sk->sk_data_ready().
      
      3) If application is using poll(), tcp_poll() will then use
      tcp_stream_is_readable() and decide the socket receive queue is
      not yet filled, so nothing will happen.
      
      Even when sender retransmits packets, phases 2) & 3) repeat
      and flow is effectively frozen, until memory pressure is off.
      
      Fix is to consider tcp_under_memory_pressure() to take care
      of global memory pressure or memcg pressure.
      
      Fixes: 24adbc16 ("tcp: fix SO_RCVLOWAT hangs with fat skbs")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NArjun Roy <arjunroy@google.com>
      Suggested-by: NWei Wang <weiwan@google.com>
      Reviewed-by: NWei Wang <weiwan@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f969dc5a
    • D
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 5cdaf9d6
      David S. Miller 提交于
      Tony Nguyen says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2021-02-12
      
      This series contains updates to i40e, ice, and ixgbe drivers.
      
      Maciej does cleanups on the following drivers.
      For i40e, removes redundant check for XDP prog, cleans up no longer
      relevant information, and removes an unused function argument.
      For ice, removes local variable use, instead returning values directly.
      Moves skb pointer from buffer to ring and removes an unneeded check for
      xdp_prog in zero copy path. Also removes a redundant MTU check when
      changing it.
      For i40e, ice, and ixgbe, stores the rx_offset in the Rx ring as
      the value is constant so there's no need for continual calls.
      
      Bjorn folds a decrement into a while statement.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5cdaf9d6
    • D
      Merge branch 'tc-mpls-selftests' · 7aceeb73
      David S. Miller 提交于
      Guillaume Nault says:
      
      ====================
      selftests: tc: Test tc-flower's MPLS features
      
      A couple of patches for exercising the MPLS filters of tc-flower.
      
      Patch 1 tests basic MPLS matching features: those that only work on the
      first label stack entry (that is, the mpls_label, mpls_tc, mpls_bos and
      mpls_ttl options).
      
      Patch 2 tests the more generic "mpls" and "lse" options, which allow
      matching MPLS fields beyond the first stack entry.
      
      In both patches, special care is taken to skip these new tests for
      incompatible versions of tc.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7aceeb73
    • G
      selftests: tc: Add generic mpls matching support for tc-flower · c09bfd9a
      Guillaume Nault 提交于
      Add tests in tc_flower.sh for generic matching on MPLS Label Stack
      Entries. The label, tc, bos and ttl fields are tested for the first
      and second labels. For each field, the minimal and maximal values are
      tested (the former at depth 1 and the later at depth 2).
      There are also tests for matching the presence of a label stack entry
      at a given depth.
      
      In order to reduce the amount of code, all "lse" subcommands are tested
      in match_mpls_lse_test(). Action "continue" is used, so that test
      packets are evaluated by all filters. Then, we can verify if each
      filter matched the expected number of packets.
      
      Some versions of tc-flower produced invalid json output when dumping
      MPLS filters with depth > 1. Skip the test if tc isn't recent enough.
      Signed-off-by: NGuillaume Nault <gnault@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c09bfd9a
    • G
      selftests: tc: Add basic mpls_* matching support for tc-flower · 203ee5cd
      Guillaume Nault 提交于
      Add tests in tc_flower.sh for mpls_label, mpls_tc, mpls_bos and
      mpls_ttl. For each keyword, test the minimal and maximal values.
      
      Selectively skip these new mpls tests for tc versions that don't
      support them.
      Signed-off-by: NGuillaume Nault <gnault@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      203ee5cd
    • D
      Merge branch 'brport-flags' · 4098ced4
      David S. Miller 提交于
      Vladimir Oltean says:
      
      ====================
      Cleanup in brport flags switchdev offload for DSA
      
      The initial goal of this series was to have better support for
      standalone ports mode on the DSA drivers like ocelot/felix and sja1105.
      This turned out to require some API adjustments in both directions:
      to the information presented to and by the switchdev notifier, and to
      the API presented to the switch drivers by the DSA layer.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4098ced4
    • V
      net: dsa: sja1105: offload bridge port flags to device · 4d942354
      Vladimir Oltean 提交于
      The chip can configure unicast flooding, broadcast flooding and learning.
      Learning is per port, while flooding is per {ingress, egress} port pair
      and we need to configure the same value for all possible ingress ports
      towards the requested one.
      
      While multicast flooding is not officially supported, we can hack it by
      using a feature of the second generation (P/Q/R/S) devices, which is that
      FDB entries are maskable, and multicast addresses always have an odd
      first octet. So by putting a match-all for 00:01:00:00:00:00 addr and
      00:01:00:00:00:00 mask at the end of the FDB, we make sure that it is
      always checked last, and does not take precedence in front of any other
      MDB. So it behaves effectively as an unknown multicast entry.
      
      For the first generation switches, this feature is not available, so
      unknown multicast will always be treated the same as unknown unicast.
      So the only thing we can do is request the user to offload the settings
      for these 2 flags in tandem, i.e.
      
      ip link set swp2 type bridge_slave flood off
      Error: sja1105: This chip cannot configure multicast flooding independently of unicast.
      ip link set swp2 type bridge_slave flood off mcast_flood off
      ip link set swp2 type bridge_slave mcast_flood on
      Error: sja1105: This chip cannot configure multicast flooding independently of unicast.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d942354
    • V
      net: mscc: ocelot: offload bridge port flags to device · 421741ea
      Vladimir Oltean 提交于
      We should not be unconditionally enabling address learning, since doing
      that is actively detrimential when a port is standalone and not offloading
      a bridge. Namely, if a port in the switch is standalone and others are
      offloading the bridge, then we could enter a situation where we learn an
      address towards the standalone port, but the bridged ports could not
      forward the packet there, because the CPU is the only path between the
      standalone and the bridged ports. The solution of course is to not
      enable address learning unless the bridge asks for it.
      
      We need to set up the initial port flags for no learning and flooding
      everything, and also when the port joins and leaves the bridge.
      The flood configuration was already configured ok for standalone mode
      in ocelot_init, we just need to disable learning in ocelot_init_port.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      421741ea
    • V
      net: mscc: ocelot: use separate flooding PGID for broadcast · b360d94f
      Vladimir Oltean 提交于
      In preparation of offloading the bridge port flags which have
      independent settings for unknown multicast and for broadcast, we should
      also start reserving one destination Port Group ID for the flooding of
      broadcast packets, to allow configuring it individually.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b360d94f