Skip to content
  1. Aug 03, 2022
    • Jason A. Donenfeld's avatar
      wireguard: ratelimiter: use hrtimer in selftest · 151c8e49
      Jason A. Donenfeld authored
      Using msleep() is problematic because it's compared against
      ratelimiter.c's ktime_get_coarse_boottime_ns(), which means on systems
      with slow jiffies (such as UML's forced HZ=100), the result is
      inaccurate. So switch to using schedule_hrtimeout().
      
      However, hrtimer gives us access only to the traditional posix timers,
      and none of the _COARSE variants. So now, rather than being too
      imprecise like jiffies, it's too precise.
      
      One solution would be to give it a large "range" value, but this will
      still fire early on a loaded system. A better solution is to align the
      timeout to the actual coarse timer, and then round up to the nearest
      tick, plus change.
      
      So add the timeout to the current coarse time, and then
      schedule_hrtimer() until the absolute computed time.
      
      This should hopefully reduce flakes in CI as well. Note that we keep the
      retry loop in case the entire function is running behind, because the
      test could still be scheduled out, by either the kernel or by the
      hypervisor's kernel, in which case restarting the test and hoping to not
      be scheduled out still helps.
      
      Fixes: e7096c13
      
       ("net: WireGuard secure network tunnel")
      Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      151c8e49
  2. Aug 02, 2022
  3. Aug 01, 2022
  4. Jul 30, 2022
    • Jakub Kicinski's avatar
      Merge tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 63757225
      Jakub Kicinski authored
      
      
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2022-07-28
      
      Misc updates to mlx5 driver:
      
      1) Gal corrects to use skb_tcp_all_headers on encapsulated skbs.
      
      2) Roi Adds the support for offloading standalone police actions.
      
      3) lama, did some refactoring to minimize code coupling with
      mlx5e_priv "god object" in some of the follows, and converts some of the
      objects to pointers to preserve on memory when these objects aren't needed.
      This is part one of two parts series.
      
      * tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
        net/mlx5e: Move mlx5e_init_l2_addr to en_main
        net/mlx5e: Split en_fs ndo's and move to en_main
        net/mlx5e: Separate mlx5e_set_rx_mode_work and move caller to en_main
        net/mlx5e: Add mdev to flow_steering struct
        net/mlx5e: Report flow steering errors with mdev err report API
        net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer
        net/mlx5e: Allocate VLAN and TC for featured profiles only
        net/mlx5e: Make mlx5e_tc_table private
        net/mlx5e: Convert mlx5e_tc_table member of mlx5e_flow_steering to pointer
        net/mlx5e: TC, Support tc action api for police
        net/mlx5e: TC, Separate get/update/replace meter functions
        net/mlx5e: Add red and green counters for metering
        net/mlx5e: TC, Allocate post meter ft per rule
        net/mlx5: DR, Add support for flow metering ASO
        net/mlx5e: Fix wrong use of skb_tcp_all_headers() with encapsulation
      ====================
      
      Link: https://lore.kernel.org/r/20220728205728.143074-1-saeed@kernel.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      63757225
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 84a8d931
      Jakub Kicinski authored
      
      
      Tony Nguyen says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2022-07-28
      
      This series contains updates to ice driver only.
      
      Michal allows for VF true promiscuous mode to be set for multiple VFs
      and adds clearing of promiscuous filters when VF trust is removed.
      
      Maciej refactors ice_set_features() to track/check changed features
      instead of constantly checking against netdev features and adds support for
      NETIF_F_LOOPBACK.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
        ice: allow toggling loopback mode via ndo_set_features callback
        ice: compress branches in ice_set_features()
        ice: Fix promiscuous mode not turning off
        ice: Introduce enabling promiscuous mode on multiple VF's
      ====================
      
      Link: https://lore.kernel.org/r/20220728195538.3391360-1-anthony.l.nguyen@intel.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      84a8d931
    • Jakub Kicinski's avatar
      Merge branch 'sfc-vf-representors-for-ef100-rx-side' · ed3849e4
      Jakub Kicinski authored
      
      
      Edward Cree says:
      
      ====================
      sfc: VF representors for EF100 - RX side
      
      This series adds the receive path for EF100 VF representors, plus other
       minor features such as statistics.
      ====================
      
      Link: https://lore.kernel.org/r/cover.1659034549.git.ecree.xilinx@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ed3849e4
    • Edward Cree's avatar
      sfc: implement ethtool get/set RX ring size for EF100 reps · 7267aa6d
      Edward Cree authored
      
      
      It's not truly a ring, but the maximum length of the list of queued RX
       SKBs is analogous to an RX ring size, so use that API to configure it.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7267aa6d
    • Edward Cree's avatar
      sfc: use a dynamic m-port for representor RX and set it promisc · e37f3b15
      Edward Cree authored
      
      
      Representors do not want to be subject to the PF's Ethernet address
       filters, since traffic from VFs will typically have a destination
       either elsewhere on the link segment or on an overlay network.
      So, create a dynamic m-port with promiscuous and all-multicast
       filters, and set it as the egress port of representor default rules.
       Since the m-port is an alias of the calling PF's own m-port, traffic
       will still be delivered to the PF's RXQs, but it will be subject to
       the VNRX filter rules installed on the dynamic m-port (specified by
       the v-port ID field of the filter spec).
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e37f3b15
    • Edward Cree's avatar
      sfc: move table locking into filter_table_{probe,remove} methods · 77eb4074
      Edward Cree authored
      
      
      We need to be able to drop the efx->filter_sem in ef100_filter_table_up()
       so that we can call functions that insert filters (and thus take that
       rwsem for read), which means the efx->type->filter_table_probe method
       needs to be responsible for taking the lock in the first place.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      77eb4074
    • Edward Cree's avatar
      sfc: insert default MAE rules to connect VFs to representors · 67ab160e
      Edward Cree authored
      
      
      Default rules are low-priority switching rules which the hardware uses
       in the absence of higher-priority rules.  Each representor requires a
       corresponding rule matching traffic from its representee VF and
       delivering to the PF (where a check on INGRESS_MPORT in
       __ef100_rx_packet() will direct it to the representor).  No rule is
       required in the reverse direction, because representor TX uses a TX
       override descriptor to bypass the MAE and deliver directly to the VF.
      Since inserting any rule into the MAE disables the firmware's own
       default rules, also insert a pair of rules to connect the PF to the
       physical network port and vice-versa.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      67ab160e
    • Edward Cree's avatar
      sfc: receive packets from EF100 VFs into representors · f50e8fcd
      Edward Cree authored
      
      
      If the source m-port of a packet in __ef100_rx_packet() is a VF,
       hand off the packet to the corresponding representor with
       efx_ef100_rep_rx_packet().
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f50e8fcd
    • Edward Cree's avatar
      sfc: check ef100 RX packets are from the wire · 08d0b16e
      Edward Cree authored
      
      
      If not, for now drop them and warn.  A subsequent patch will look up
       the source m-port to try and find a representor to deliver them to.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      08d0b16e
    • Edward Cree's avatar
      sfc: determine wire m-port at EF100 PF probe time · 6f6838aa
      Edward Cree authored
      
      
      Traffic delivered to the (MAE admin) PF could be from either the wire
       or a VF.  The INGRESS_MPORT field of the RX prefix distinguishes these;
       base_mport is the value this field will have for traffic from the wire
       (which should be delivered to the PF's netdevice, not a representor).
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6f6838aa
    • Edward Cree's avatar
      sfc: ef100 representor RX top half · 9fe00c80
      Edward Cree authored
      
      
      Representor RX uses a NAPI context driven by a 'fake interrupt': when
       the parent PF receives a packet destined for the representor, it adds
       it to an SKB list (efv->rx_list), and schedules NAPI if the 'fake
       interrupt' is primed.  The NAPI poll then pulls packets off this list
       and feeds them to the stack with netif_receive_skb_list().
      This scheme allows us to decouple representor RX from the parent PF's
       RX fast-path.
      This patch implements the 'top half', which builds an SKB, copies data
       into it from the RX buffer (which can then be released), adds it to
       the queue and fires the 'fake interrupt' if necessary.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9fe00c80
    • Edward Cree's avatar
      sfc: ef100 representor RX NAPI poll · 69bb5fa7
      Edward Cree authored
      
      
      This patch adds the 'bottom half' napi->poll routine for representor RX.
      See the next patch (with the top half) for an explanation of the 'fake
       interrupt' scheme used to drive this NAPI context.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      69bb5fa7
    • Edward Cree's avatar
      sfc: plumb ef100 representor stats · a95115c4
      Edward Cree authored
      
      
      Implement .ndo_get_stats64() method to read values out of struct
       efx_rep_sw_stats.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a95115c4