1. Apr 11, 2022
  2. Apr 09, 2022
  3. Apr 08, 2022
    • Andrii Nakryiko's avatar
      Merge branch 'Add USDT support for s390' · 700a6ef1
      Andrii Nakryiko authored
      
      
      Ilya Leoshkevich says:
      
      ====================
      
      This series adds USDT support for s390, making the "usdt" test pass
      there. Patch 1 is a collection of minor cleanups, patch 2 adds
      BPF-side support, patch 3 adds userspace-side support.
      ====================
      
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      700a6ef1
    • Ilya Leoshkevich's avatar
      libbpf: Add s390-specific USDT arg spec parsing logic · bd022685
      Ilya Leoshkevich authored
      
      
      The logic is superficially similar to that of x86, but the small
      differences (no need for register table and dynamic allocation of
      register names, no $ sign before constants) make maintaining a common
      implementation too burdensome. Therefore simply add a s390x-specific
      version of parse_usdt_arg().
      
      Note that while bcc supports index registers, this patch does not. This
      should not be a problem in most cases, since s390 uses a default value
      "nor" for STAP_SDT_ARG_CONSTRAINT.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20220407214411.257260-4-iii@linux.ibm.com
      bd022685
    • David S. Miller's avatar
      Merge branch 'net-sched-offload-failure-error-reporting' · 85b15c26
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      net/sched: Better error reporting for offload failures
      
      This patchset improves error reporting to user space when offload fails
      during the flow action setup phase. That is, when failures occur in the
      actions themselves, even before calling device drivers. Requested /
      reported in [1].
      
      This is done by passing extack to the offload_act_setup() callback and
      making use of it in the various actions.
      
      Patches #1-#2 change matchall and flower to log error messages to user
      space in accordance with the verbose flag.
      
      Patch #3 passes extack to the offload_act_setup() callback from the
      various call sites, including matchall and flower.
      
      Patches #4-#11 make use of extack in the various actions to report
      offload failures.
      
      Patch #12 adds an error message when the action does not support offload
      at all.
      
      Patches #13-#14 change matchall and flower to stop overwriting more
      specific error messages.
      
      [1] https://lore.kernel.org/netdev/20220317185249.5mff5u2x624pjewv@skbuf/
      
      
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85b15c26
    • Ido Schimmel's avatar
      net/sched: flower: Avoid overwriting error messages · fd23e0e2
      Ido Schimmel authored
      
      
      The various error paths of tc_setup_offload_action() now report specific
      error messages. Remove the generic messages to avoid overwriting the
      more specific ones.
      
      Before:
      
       # tc filter add dev dummy0 ingress pref 1 proto ip flower skip_sw dst_ip 198.51.100.1 action police rate 100Mbit burst 10000
       Error: cls_flower: Failed to setup flow action.
       We have an error talking to the kernel
      
      After:
      
       # tc filter add dev dummy0 ingress pref 1 proto ip flower skip_sw dst_ip 198.51.100.1 action police rate 100Mbit burst 10000
       Error: act_police: Offload not supported when conform/exceed action is "reclassify".
       We have an error talking to the kernel
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd23e0e2
    • Ido Schimmel's avatar
      net/sched: matchall: Avoid overwriting error messages · 0cba5c34
      Ido Schimmel authored
      
      
      The various error paths of tc_setup_offload_action() now report specific
      error messages. Remove the generic messages to avoid overwriting the
      more specific ones.
      
      Before:
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action police rate 100Mbit burst 10000
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
      After:
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action police rate 100Mbit burst 10000
       Error: act_police: Offload not supported when conform/exceed action is "reclassify".
       We have an error talking to the kernel
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0cba5c34
    • Ido Schimmel's avatar
      net/sched: cls_api: Add extack message for unsupported action offload · c440615f
      Ido Schimmel authored
      
      
      For better error reporting to user space, add an extack message when the
      requested action does not support offload.
      
      Example:
      
       # echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action nat ingress 192.0.2.1 198.51.100.1
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-181     [000] b..1.    88.406093: netlink_extack: msg=Action does not support offload
             tc-181     [000] .....    88.406108: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c440615f
    • Ido Schimmel's avatar
      net/sched: act_vlan: Add extack message for offload failure · f8fab316
      Ido Schimmel authored
      
      
      For better error reporting to user space, add an extack message when
      vlan action offload fails.
      
      Currently, the failure cannot be triggered, but add a message in case
      the action is extended in the future to support more than the current
      set of modes.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8fab316
    • Ido Schimmel's avatar
      net/sched: act_tunnel_key: Add extack message for offload failure · ee367d44
      Ido Schimmel authored
      
      
      For better error reporting to user space, add an extack message when
      tunnel_key action offload fails.
      
      Currently, the failure cannot be triggered, but add a message in case
      the action is extended in the future to support more than set/release
      modes.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee367d44
    • Ido Schimmel's avatar
      net/sched: act_skbedit: Add extack messages for offload failure · a9c64939
      Ido Schimmel authored
      
      
      For better error reporting to user space, add extack messages when
      skbedit action offload fails.
      
      Example:
      
       # echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action skbedit queue_mapping 1234
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-185     [002] b..1.    31.802414: netlink_extack: msg=act_skbedit: Offload not supported when "queue_mapping" option is used
             tc-185     [002] .....    31.802418: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action skbedit inheritdsfield
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-187     [002] b..1.    45.985145: netlink_extack: msg=act_skbedit: Offload not supported when "inheritdsfield" option is used
             tc-187     [002] .....    45.985160: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9c64939
    • Ido Schimmel's avatar
      net/sched: act_police: Add extack messages for offload failure · b50e462b
      Ido Schimmel authored
      
      
      For better error reporting to user space, add extack messages when
      police action offload fails.
      
      Example:
      
       # echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action police rate 100Mbit burst 10000
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-182     [000] b..1.    21.592969: netlink_extack: msg=act_police: Offload not supported when conform/exceed action is "reclassify"
             tc-182     [000] .....    21.592982: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action police rate 100Mbit burst 10000 conform-exceed drop/continue
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-184     [000] b..1.    38.882579: netlink_extack: msg=act_police: Offload not supported when conform/exceed action is "continue"
             tc-184     [000] .....    38.882593: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b50e462b
    • Ido Schimmel's avatar
      net/sched: act_pedit: Add extack message for offload failure · bf3b99e4
      Ido Schimmel authored
      
      
      For better error reporting to user space, add an extack message when
      pedit action offload fails.
      
      Currently, the failure cannot be triggered, but add a message in case
      the action is extended in the future to support more than set/add
      commands.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bf3b99e4
    • Ido Schimmel's avatar
      net/sched: act_mpls: Add extack messages for offload failure · bca3821d
      Ido Schimmel authored
      
      
      For better error reporting to user space, add extack messages when mpls
      action offload fails.
      
      Example:
      
       # echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action mpls dec_ttl
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-182     [000] b..1.    18.693915: netlink_extack: msg=act_mpls: Offload not supported when "dec_ttl" option is used
             tc-182     [000] .....    18.693921: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bca3821d
    • Ido Schimmel's avatar
      net/sched: act_mirred: Add extack message for offload failure · 4dcaa50d
      Ido Schimmel authored
      
      
      For better error reporting to user space, add an extack message when
      mirred action offload fails.
      
      Currently, the failure cannot be triggered, but add a message in case
      the action is extended in the future to support more than ingress/egress
      mirror/redirect.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4dcaa50d
    • Ido Schimmel's avatar
      net/sched: act_gact: Add extack messages for offload failure · 69642c2a
      Ido Schimmel authored
      
      
      For better error reporting to user space, add extack messages when gact
      action offload fails.
      
      Example:
      
       # echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action continue
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-181     [002] b..1.   105.493450: netlink_extack: msg=act_gact: Offload of "continue" action is not supported
             tc-181     [002] .....   105.493466: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action reclassify
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-183     [002] b..1.   124.126477: netlink_extack: msg=act_gact: Offload of "reclassify" action is not supported
             tc-183     [002] .....   124.126489: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
       # tc filter add dev dummy0 ingress pref 1 proto all matchall skip_sw action pipe action drop
       Error: cls_matchall: Failed to setup flow action.
       We have an error talking to the kernel
      
       # cat /sys/kernel/tracing/trace_pipe
             tc-185     [002] b..1.   137.097791: netlink_extack: msg=act_gact: Offload of "pipe" action is not supported
             tc-185     [002] .....   137.097804: netlink_extack: msg=cls_matchall: Failed to setup flow action
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69642c2a
    • Ido Schimmel's avatar
      net/sched: act_api: Add extack to offload_act_setup() callback · c2ccf84e
      Ido Schimmel authored
      
      
      The callback is used by various actions to populate the flow action
      structure prior to offload. Pass extack to this callback so that the
      various actions will be able to report accurate error messages to user
      space.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2ccf84e
    • Ido Schimmel's avatar
      net/sched: flower: Take verbose flag into account when logging error messages · 11c95317
      Ido Schimmel authored
      The verbose flag was added in commit 81c7288b
      
       ("sched: cls: enable
      verbose logging") to avoid suppressing logging of error messages that
      occur "when the rule is not to be exclusively executed by the hardware".
      
      However, such error messages are currently suppressed when setup of flow
      action fails. Take the verbose flag into account to avoid suppressing
      error messages. This is done by using the extack pointer initialized by
      tc_cls_common_offload_init(), which performs the necessary checks.
      
      Before:
      
       # tc filter add dev dummy0 ingress pref 1 proto ip flower dst_ip 198.51.100.1 action police rate 100Mbit burst 10000
       # tc filter add dev dummy0 ingress pref 2 proto ip flower verbose dst_ip 198.51.100.1 action police rate 100Mbit burst 10000
      
      After:
      
       # tc filter add dev dummy0 ingress pref 1 proto ip flower dst_ip 198.51.100.1 action police rate 100Mbit burst 10000
       # tc filter add dev dummy0 ingress pref 2 proto ip flower verbose dst_ip 198.51.100.1 action police rate 100Mbit burst 10000
       Warning: cls_flower: Failed to setup flow action.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11c95317
    • Ido Schimmel's avatar
      net/sched: matchall: Take verbose flag into account when logging error messages · 4c096ea2
      Ido Schimmel authored
      The verbose flag was added in commit 81c7288b
      
       ("sched: cls: enable
      verbose logging") to avoid suppressing logging of error messages that
      occur "when the rule is not to be exclusively executed by the hardware".
      
      However, such error messages are currently suppressed when setup of flow
      action fails. Take the verbose flag into account to avoid suppressing
      error messages. This is done by using the extack pointer initialized by
      tc_cls_common_offload_init(), which performs the necessary checks.
      
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c096ea2
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/nex · 4a778f3d
      David S. Miller authored
      
      t-queue
      
      Tony Nguyen says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2022-04-07
      
      Alexander Lobakin says:
      
      This hunts down several places around packet templates/dummies for
      switch rules which are either repetitive, fragile or just not
      really readable code.
      It's a common need to add new packet templates and to review such
      changes as well, try to simplify both with the help of a pair
      macros and aliases.
      ice_find_dummy_packet() became very complex at this point with tons
      of nested if-elses. It clearly showed this approach does not scale,
      so convert its logics to the simple mask-match + static const array.
      
      bloat-o-meter is happy about that (built w/ LLVM 13):
      
      add/remove: 0/1 grow/shrink: 1/1 up/down: 2/-1058 (-1056)
      Function                                     old     new   delta
      ice_fill_adv_dummy_packet                    289     291      +2
      ice_adv_add_update_vsi_list                  201       -    -201
      ice_add_adv_rule                            2950    2093    -857
      Total: Before=414512, After=413456, chg -0.25%
      add/remove: 53/52 grow/shrink: 0/0 up/down: 4660/-3988 (672)
      RO Data                                      old     new   delta
      ice_dummy_pkt_profiles                         -     672    +672
      Total: Before=37895, After=38567, chg +1.77%
      
      Diffstat also looks nice, and adding new packet templates now takes
      less lines.
      
      We'll probably come out with dynamic template crafting in a while,
      but for now let's improve what we have currently.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a778f3d
    • David S. Miller's avatar
      Merge branch 'aspeed-mdio-c45' · e89006be
      David S. Miller authored
      Potin Lai says:
      
      ====================
      mdio: aspeed: Add Clause 45 support for Aspeed MDIO
      
      This patch series add Clause 45 support for Aspeed MDIO driver, and
      separate c22 and c45 implementation into different functions.
      
      LINK: [v1] https://lore.kernel.org/all/20220329161949.19762-1-potin.lai@quantatw.com/
      LINK: [v2] https://lore.kernel.org/all/20220406170055.28516-1-potin.lai@quantatw.com/
      
      
      
      Changes v2 --> v3:
       - sort local variable sequence in reverse Christmas tree format.
      
      Changes v1 --> v2:
       - add C45 to probe_capabilities
       - break one patch into 3 small patches
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e89006be
    • Potin Lai's avatar
      net: mdio: aspeed: Add c45 support · e6df1b4a
      Potin Lai authored
      
      
      Add Clause 45 support for Aspeed mdio driver.
      
      Signed-off-by: default avatarPotin Lai <potin.lai@quantatw.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6df1b4a
    • Potin Lai's avatar
      net: mdio: aspeed: Introduce read write function for c22 and c45 · eb057193
      Potin Lai authored
      
      
      Add following additional functions to move out the implementation from
      aspeed_mdio_read() and aspeed_mdio_write().
      
      c22:
       - aspeed_mdio_read_c22()
       - aspeed_mdio_write_c22()
      
      c45:
       - aspeed_mdio_read_c45()
       - aspeed_mdio_write_c45()
      
      Signed-off-by: default avatarPotin Lai <potin.lai@quantatw.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb057193
    • Potin Lai's avatar
      net: mdio: aspeed: move reg accessing part into separate functions · 737ca352
      Potin Lai authored
      
      
      Add aspeed_mdio_op() and aseed_mdio_get_data() for register accessing.
      
      aspeed_mdio_op() handles operations, write command to control register,
      then check and wait operations is finished (bit 31 is cleared).
      
      aseed_mdio_get_data() fetchs the result value of operation from data
      register.
      
      Signed-off-by: default avatarPotin Lai <potin.lai@quantatw.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      737ca352
    • Jakub Kicinski's avatar
      net: atm: remove the ambassador driver · e05afd08
      Jakub Kicinski authored
      The driver for ATM Ambassador devices spews build warnings on
      microblaze. The virt_to_bus() calls discard the volatile keyword.
      The right thing to do would be to migrate this driver to a modern
      DMA API but it seems unlikely anyone is actually using it.
      There had been no fixes or functional changes here since
      the git era begun.
      
      In fact it sounds like the FW loading was broken from 2008
      'til 2012 - see commit fcdc90b0 ("atm: forever loop loading
      ambassador firmware").
      
      Let's remove this driver, there isn't much changing in the APIs,
      if users come forward we can apologize and revert.
      
      Link: https://lore.kernel.org/all/20220321144013.440d7fc0@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e05afd08