1. 28 7月, 2021 29 次提交
  2. 27 7月, 2021 11 次提交
    • T
      qdisc: add new field for qdisc_enqueue tracepoint · 409f386b
      Tonghao Zhang 提交于
      qdisc_enqueue tracepoint can work with qdisc:qdisc_dequeue
      to measure packets latency in qdisc queues.
      
      Add a new field txq for it, then we can retrieve more info.
      Signed-off-by: NTonghao Zhang <xiangxia.m.yue@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      409f386b
    • J
      net: qed: remove unneeded return variables · ef17e2ac
      Jason Wang 提交于
      Some return variables are never changed until function returned.
      These variables are unneeded for their functions. Therefore, the
      unneeded return variables can be removed safely by returning their
      initial values.
      Signed-off-by: NJason Wang <wangborong@cdjrlc.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef17e2ac
    • I
      docs: networking: dpaa2: add documentation for the switch driver · d4b996f9
      Ioana Ciornei 提交于
      Add a documentation entry for the DPAA2 switch listing its
      requirements, features and some examples to go along them.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4b996f9
    • D
      Merge branch 'ovs-upcall-issues' · 453a343c
      David S. Miller 提交于
      Mark Gray says:
      
      ====================
      openvswitch: per-cpu upcall patchwork issues
      
      Some issues were raised by patchwork at:
      https://patchwork.kernel.org/project/netdevbpf/patch/20210630095350.817785-1-mark.d.gray@redhat.com/#24285159
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      453a343c
    • M
      openvswitch: fix sparse warning incorrect type · 076999e4
      Mark Gray 提交于
      fix incorrect type in argument 1 (different address spaces)
      
      ../net/openvswitch/datapath.c:169:17: warning: incorrect type in argument 1 (different address spaces)
      ../net/openvswitch/datapath.c:169:17:    expected void const *
      ../net/openvswitch/datapath.c:169:17:    got struct dp_nlsk_pids [noderef] __rcu *upcall_portids
      
      Found at: https://patchwork.kernel.org/project/netdevbpf/patch/20210630095350.817785-1-mark.d.gray@redhat.com/#24285159Signed-off-by: NMark Gray <mark.d.gray@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      076999e4
    • M
      openvswitch: fix alignment issues · 784dcfa5
      Mark Gray 提交于
      Signed-off-by: NMark Gray <mark.d.gray@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      784dcfa5
    • M
      e4252cb6
    • Y
      net: netlink: add the case when nlh is NULL · f9b282b3
      Yajun Deng 提交于
      Add the case when nlh is NULL in nlmsg_report(),
      so that the caller doesn't need to deal with this case.
      Signed-off-by: NYajun Deng <yajun.deng@linux.dev>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9b282b3
    • V
      net: build all switchdev drivers as modules when the bridge is a module · b0e81817
      Vladimir Oltean 提交于
      Currently, all drivers depend on the bool CONFIG_NET_SWITCHDEV, but only
      the drivers that call some sort of function exported by the bridge, like
      br_vlan_enabled() or whatever, have an extra dependency on CONFIG_BRIDGE.
      
      Since the blamed commit, all switchdev drivers have a functional
      dependency upon switchdev_bridge_port_{,un}offload(), which is a pair of
      functions exported by the bridge module and not by the bridge-independent
      part of CONFIG_NET_SWITCHDEV.
      
      Problems appear when we have:
      
      CONFIG_BRIDGE=m
      CONFIG_NET_SWITCHDEV=y
      CONFIG_TI_CPSW_SWITCHDEV=y
      
      because cpsw, am65_cpsw and sparx5 will then be built-in but they will
      call a symbol exported by a loadable module. This is not possible and
      will result in the following build error:
      
      drivers/net/ethernet/ti/cpsw_new.o: in function `cpsw_netdevice_event':
      drivers/net/ethernet/ti/cpsw_new.c:1520: undefined reference to
      					`switchdev_bridge_port_offload'
      drivers/net/ethernet/ti/cpsw_new.c:1537: undefined reference to
      					`switchdev_bridge_port_unoffload'
      
      As mentioned, the other switchdev drivers don't suffer from this because
      switchdev_bridge_port_offload() is not the first symbol exported by the
      bridge that they are calling, so they already needed to deal with this
      in the same way.
      
      Fixes: 2f5dc00f ("net: bridge: switchdev: let drivers inform which bridge ports are offloaded")
      Reported-by: NLinux Kernel Functional Testing <lkft@linaro.org>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0e81817
    • S
      ethtool: Fix rxnfc copy to user buffer overflow · 9b29a161
      Saeed Mahameed 提交于
      In the cited commit, copy_to_user() got called with the wrong pointer,
      instead of passing the actual buffer ptr to copy from, a pointer to
      the pointer got passed, which causes a buffer overflow calltrace to pop
      up when executing "ethtool -x ethX".
      
      Fix ethtool_rxnfc_copy_to_user() to use the rxnfc pointer as passed
      to the function, instead of a pointer to it.
      
      This fixes below call trace:
      [   15.533533] ------------[ cut here ]------------
      [   15.539007] Buffer overflow detected (8 < 192)!
      [   15.544110] WARNING: CPU: 3 PID: 1801 at include/linux/thread_info.h:200 copy_overflow+0x15/0x20
      [   15.549308] Modules linked in:
      [   15.551449] CPU: 3 PID: 1801 Comm: ethtool Not tainted 5.14.0-rc2+ #1058
      [   15.553919] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
      [   15.558378] RIP: 0010:copy_overflow+0x15/0x20
      [   15.560648] Code: e9 7c ff ff ff b8 a1 ff ff ff eb c4 66 0f 1f 84 00 00 00 00 00 55 48 89 f2 89 fe 48 c7 c7 88 55 78 8a 48 89 e5 e8 06 5c 1e 00 <0f> 0b 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 55
      [   15.565114] RSP: 0018:ffffad49c0523bd0 EFLAGS: 00010286
      [   15.566231] RAX: 0000000000000000 RBX: 00000000000000c0 RCX: 0000000000000000
      [   15.567616] RDX: 0000000000000001 RSI: ffffffff8a7912e7 RDI: 00000000ffffffff
      [   15.569050] RBP: ffffad49c0523bd0 R08: ffffffff8ab2ae28 R09: 00000000ffffdfff
      [   15.570534] R10: ffffffff8aa4ae40 R11: ffffffff8aa4ae40 R12: 0000000000000000
      [   15.571899] R13: 00007ffd4cc2a230 R14: ffffad49c0523c00 R15: 0000000000000000
      [   15.573584] FS:  00007f538112f740(0000) GS:ffff96d5bdd80000(0000) knlGS:0000000000000000
      [   15.575639] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   15.577092] CR2: 00007f5381226d40 CR3: 0000000013542000 CR4: 00000000001506e0
      [   15.578929] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   15.580695] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   15.582441] Call Trace:
      [   15.582970]  ethtool_rxnfc_copy_to_user+0x30/0x46
      [   15.583815]  ethtool_get_rxnfc.cold+0x23/0x2b
      [   15.584584]  dev_ethtool+0x29c/0x25f0
      [   15.585286]  ? security_netlbl_sid_to_secattr+0x77/0xd0
      [   15.586728]  ? do_set_pte+0xc4/0x110
      [   15.587349]  ? _raw_spin_unlock+0x18/0x30
      [   15.588118]  ? __might_sleep+0x49/0x80
      [   15.588956]  dev_ioctl+0x2c1/0x490
      [   15.589616]  sock_ioctl+0x18e/0x330
      [   15.591143]  __x64_sys_ioctl+0x41c/0x990
      [   15.591823]  ? irqentry_exit_to_user_mode+0x9/0x20
      [   15.592657]  ? irqentry_exit+0x33/0x40
      [   15.593308]  ? exc_page_fault+0x32f/0x770
      [   15.593877]  ? exit_to_user_mode_prepare+0x3c/0x130
      [   15.594775]  do_syscall_64+0x35/0x80
      [   15.595397]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [   15.596037] RIP: 0033:0x7f5381226d4b
      [   15.596492] Code: 0f 1e fa 48 8b 05 3d b1 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0d b1 0c 00 f7 d8 64 89 01 48
      [   15.598743] RSP: 002b:00007ffd4cc2a1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [   15.599804] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5381226d4b
      [   15.600795] RDX: 00007ffd4cc2a350 RSI: 0000000000008946 RDI: 0000000000000003
      [   15.601712] RBP: 00007ffd4cc2a340 R08: 00007ffd4cc2a350 R09: 0000000000000001
      [   15.602751] R10: 00007f538128a990 R11: 0000000000000246 R12: 0000000000000000
      [   15.603882] R13: 00007ffd4cc2a350 R14: 00007ffd4cc2a4b0 R15: 0000000000000000
      [   15.605042] ---[ end trace 325cf185e2795048 ]---
      
      Fixes: dd98d289 ("ethtool: improve compat ioctl handling")
      Reported-by: NShannon Nelson <snelson@pensando.io>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      Tested-by: NShannon Nelson <snelson@pensando.io>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b29a161
    • D
      Merge branch 'ipa-clock' · 268ca412
      David S. Miller 提交于
      Alex Elder says:
      
      ====================
      net: ipa: defer taking uC proxy clock
      
      This series rearranges some of the IPA initialization code.
      
      The first patch gets rid of two trivial setup and teardown
      functions, open-coding them in their callers instead.
      
      The second patch has memory regions get configured before endpoints.
      
      IPA interrupts do not depend on GSI being initialized.  Therefore
      they can be initialized in the config phase rather than waiting for
      setup.  The third patch moves this initialization earlier; memory
      regions must already be defined, so it's done after memory config.
      
      The microcontroller also has no dependency on GSI, though it does
      require IPA interrupts to be configured.  The fourth patch moves
      microcontroller initialization so it too happens during the config
      phase rather than setup.
      
      Finally, we currently take a "proxy clock" for the microcontroller
      during the config phase, dropping it only after we learn the
      microcontroller is initialized.  But microcontroller initialization
      is started by the modem, so there's no point in taking that clock
      reference before we know the modem has booted.  So the last patch
      arranges to wait to take the "proxy clock" for the microcontroller
      until we know the modem is about to boot.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      268ca412