1. 02 Oct, 2021 35 commits
  2. 01 Oct, 2021 5 commits
    • Sebastian Andrzej Siewior's avatar
      net/core: disable NET_RX_BUSY_POLL on PREEMPT_RT · 20ab39d1
      Sebastian Andrzej Siewior authored
      napi_busy_loop() disables preemption and performs a NAPI poll. We can't acquire
      sleeping locks with disabled preemption which would be required while
      __napi_poll() invokes the callback of the driver.
      
      A threaded interrupt performing the NAPI-poll can be preempted on PREEMPT_RT.
      A RT thread on another CPU may observe NAPIF_STATE_SCHED bit set and busy-spin
      until it is cleared or its spin time runs out. Given it is the task with the
      highest priority it will never observe the NEED_RESCHED bit set.
      In this case the time is better spent by simply sleeping.
      
      The NET_RX_BUSY_POLL is disabled by default (the system wide sysctls for
      poll/read are set to zero). Disabling NET_RX_BUSY_POLL on PREEMPT_RT to avoid
      wrong locking context in case it is used.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: https://lore.kernel.org/r/20211001145841.2308454-1-bigeasy@linutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      20ab39d1
    • Andrii Nakryiko's avatar
      Merge branch 'libbpf: Support uniform BTF-defined key/value specification across all BPF maps' · d636c8da
      Andrii Nakryiko authored
      Hengqi Chen says:
      
      ====================
      
      Currently a bunch of (usually pretty specialized) BPF maps do not support
      specifying BTF types for they key and value. For such maps, specifying
      their definition like this:
      
        struct {
            __uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
            __type(key, int);
            __type(value, int);
        } my_perf_buf SEC(".maps");
      
      Would actually produce warnings about retrying BPF map creation without BTF.
      Users are forced to know such nuances and use __uint(key_size, 4) instead.
      This is non-uniform, annoying, and inconvenient.
      
      This patch set teaches libbpf to recognize those specialized maps and removes
      BTF type IDs when creating BPF map. Also, update existing BPF selftests to
      exericse this change.
      ====================
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      d636c8da
    • Hengqi Chen's avatar
      selftests/bpf: Use BTF-defined key/value for map definitions · bd368cb5
      Hengqi Chen authored
      Change map definitions in BPF selftests to use BTF-defined
      key/value types. This unifies the map definitions and ensures
      libbpf won't emit warning about retrying map creation.
      Signed-off-by: default avatarHengqi Chen <hengqi.chen@gmail.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20210930161456.3444544-3-hengqi.chen@gmail.com
      bd368cb5
    • Hengqi Chen's avatar
      libbpf: Support uniform BTF-defined key/value specification across all BPF maps · f7310523
      Hengqi Chen authored
      A bunch of BPF maps do not support specifying BTF types for key and value.
      This is non-uniform and inconvenient[0]. Currently, libbpf uses a retry
      logic which removes BTF type IDs when BPF map creation failed. Instead
      of retrying, this commit recognizes those specialized maps and removes
      BTF type IDs when creating BPF map.
      
        [0] Closes: https://github.com/libbpf/libbpf/issues/355Signed-off-by: default avatarHengqi Chen <hengqi.chen@gmail.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20210930161456.3444544-2-hengqi.chen@gmail.com
      f7310523
    • Jakub Kicinski's avatar
      Merge tag 'mlx5-updates-2021-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 05f1e35a
      Jakub Kicinski authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2021-09-30
      
      1) From Yevgeny Kliteynik:
      
      This patch series deals with vport handling in SW steering.
      
      For every vport, SW steering queries FW for this vport's properties,
      such as RX/TX ICM addresses to be able to add this vport as dest action.
      The following patches rework vport capabilities managements and add support
      for Scalable Functions (SFs).
      
       - Patch 1 fixes the vport number data type all over the DR code to 16 bits
         in accordance with HW spec.
       - Patch 2 replaces local SW steering WIRE_PORT macro with the existing
         mlx5 define.
       - Patch 3 adds missing query for vport 0 and and handles eswitch manager
         capabilities for ECPF (BlueField in embedded CPU mode).
       - Patch 4 fixes error messages for failure to obtain vport caps from
         different locations in the code to have the same verbosity level and
         similar wording.
       - Patch 5 adds support for csum recalculation flow tables on SFs: it
         implements these FTs management in XArray instead of the fixed size array,
         thus adding support for csum recalculation table for any valid vport.
       - Patch 6 is the main patch of this whole series: it refactors vports
         capabilities handling and adds SFs support.
      
      2) Minor and trivial updates and cleanups
      
      * tag 'mlx5-updates-2021-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
        net/mlx5e: Use array_size() helper
        net/mlx5: Use struct_size() helper in kvzalloc()
        net/mlx5: Use kvcalloc() instead of kvzalloc()
        net/mlx5: Tolerate failures in debug features while driver load
        net/mlx5: Warn for devlink reload when there are VFs alive
        net/mlx5: DR, Add missing string for action type SAMPLER
        net/mlx5: DR, init_next_match only if needed
        net/mlx5: DR, Fix typo 'offeset' to 'offset'
        net/mlx5: DR, Increase supported num of actions to 32
        net/mlx5: DR, Add support for SF vports
        net/mlx5: DR, Support csum recalculation flow table on SFs
        net/mlx5: DR, Align error messages for failure to obtain vport caps
        net/mlx5: DR, Add missing query for vport 0
        net/mlx5: DR, Replace local WIRE_PORT macro with the existing MLX5_VPORT_UPLINK
        net/mlx5: DR, Fix vport number data type to u16
      ====================
      
      Link: https://lore.kernel.org/r/20210930232050.41779-1-saeed@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      05f1e35a