1. 02 11月, 2021 1 次提交
  2. 01 11月, 2021 5 次提交
  3. 30 10月, 2021 1 次提交
  4. 13 10月, 2021 2 次提交
    • L
      devlink: Delete reload enable/disable interface · 82465bec
      Leon Romanovsky 提交于
      Commit a0c76345 ("devlink: disallow reload operation during device
      cleanup") added devlink_reload_{enable,disable}() APIs to prevent reload
      operation from racing with device probe/dismantle.
      
      After recent changes to move devlink_register() to the end of device
      probe and devlink_unregister() to the beginning of device dismantle,
      these races can no longer happen. Reload operations will be denied if
      the devlink instance is unregistered and devlink_unregister() will block
      until all in-flight operations are done.
      
      Therefore, remove these devlink_reload_{enable,disable}() APIs.
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      82465bec
    • L
      devlink: Allow control devlink ops behavior through feature mask · bd032e35
      Leon Romanovsky 提交于
      Introduce new devlink call to set feature mask to control devlink
      behavior during device initialization phase after devlink_alloc()
      is already called.
      
      This allows us to set reload ops based on device property which
      is not known at the beginning of driver initialization.
      
      For the sake of simplicity, this API lacks any type of locking and
      needs to be called before devlink_register() to make sure that no
      parallel access to the ops is possible at this stage.
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      bd032e35
  5. 27 9月, 2021 1 次提交
  6. 22 9月, 2021 1 次提交
  7. 17 9月, 2021 1 次提交
  8. 15 9月, 2021 1 次提交
  9. 24 8月, 2021 1 次提交
  10. 09 8月, 2021 1 次提交
    • L
      devlink: Set device as early as possible · 919d13a7
      Leon Romanovsky 提交于
      All kernel devlink implementations call to devlink_alloc() during
      initialization routine for specific device which is used later as
      a parent device for devlink_register().
      
      Such late device assignment causes to the situation which requires us to
      call to device_register() before setting other parameters, but that call
      opens devlink to the world and makes accessible for the netlink users.
      
      Any attempt to move devlink_register() to be the last call generates the
      following error due to access to the devlink->dev pointer.
      
      [    8.758862]  devlink_nl_param_fill+0x2e8/0xe50
      [    8.760305]  devlink_param_notify+0x6d/0x180
      [    8.760435]  __devlink_params_register+0x2f1/0x670
      [    8.760558]  devlink_params_register+0x1e/0x20
      
      The simple change of API to set devlink device in the devlink_alloc()
      instead of devlink_register() fixes all this above and ensures that
      prior to call to devlink_register() everything already set.
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      919d13a7
  11. 06 8月, 2021 1 次提交
  12. 05 8月, 2021 1 次提交
  13. 03 8月, 2021 1 次提交
  14. 31 7月, 2021 1 次提交
  15. 21 7月, 2021 1 次提交
    • U
      bus: Make remove callback return void · fc7a6209
      Uwe Kleine-König 提交于
      The driver core ignores the return value of this callback because there
      is only little it can do when a device disappears.
      
      This is the final bit of a long lasting cleanup quest where several
      buses were converted to also return void from their remove callback.
      Additionally some resource leaks were fixed that were caused by drivers
      returning an error code in the expectation that the driver won't go
      away.
      
      With struct bus_type::remove returning void it's prevented that newly
      implemented buses return an ignored error code and so don't anticipate
      wrong expectations for driver authors.
      
      Reviewed-by: Tom Rix <trix@redhat.com> (For fpga)
      Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Reviewed-by: Cornelia Huck <cohuck@redhat.com> (For drivers/s390 and drivers/vfio)
      Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts)
      Acked-by: NMark Brown <broonie@kernel.org>
      Acked-by: Chen-Yu Tsai <wens@csie.org> (for sunxi-rsb)
      Acked-by: NPali Rohár <pali@kernel.org>
      Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for media)
      Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform)
      Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
      Acked-By: NVinod Koul <vkoul@kernel.org>
      Acked-by: Juergen Gross <jgross@suse.com> (For xen)
      Acked-by: Lee Jones <lee.jones@linaro.org> (For mfd)
      Acked-by: Johannes Thumshirn <jth@kernel.org> (For mcb)
      Acked-by: NJohan Hovold <johan@kernel.org>
      Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For slimbus)
      Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For vfio)
      Acked-by: NMaximilian Luz <luzmaximilian@gmail.com>
      Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec)
      Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack)
      Acked-by: Geoff Levand <geoff@infradead.org> (For ps3)
      Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt)
      Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th)
      Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia)
      Acked-by: Rafael J. Wysocki <rafael@kernel.org> (For ACPI)
      Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr)
      Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (For intel-ish-hid)
      Acked-by: Dan Williams <dan.j.williams@intel.com> (For CXL, DAX, and NVDIMM)
      Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> (For isa)
      Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (For firewire)
      Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (For hid)
      Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> (For siox)
      Acked-by: Sven Van Asbroeck <TheSven73@gmail.com> (For anybuss)
      Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (For MMC)
      Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C
      Acked-by: NSudeep Holla <sudeep.holla@arm.com>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: NFinn Thain <fthain@linux-m68k.org>
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc7a6209
  16. 17 7月, 2021 1 次提交
    • P
      netdevsim: Add multi-queue support · d4861fc6
      Peilin Ye 提交于
      Currently netdevsim only supports a single queue per port, which is
      insufficient for testing multi-queue TC schedulers e.g. sch_mq.  Extend
      the current sysfs interface so that users can create ports with multiple
      queues:
      
      $ echo "[ID] [PORT_COUNT] [NUM_QUEUES]" > /sys/bus/netdevsim/new_device
      
      As an example, echoing "2 4 8" creates 4 ports, with 8 queues per port.
      Note, this is compatible with the current interface, with default number
      of queues set to 1.  For example, echoing "2 4" creates 4 ports with 1
      queue per port; echoing "2" simply creates 1 port with 1 queue.
      Reviewed-by: NCong Wang <cong.wang@bytedance.com>
      Signed-off-by: NPeilin Ye <peilin.ye@bytedance.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4861fc6
  17. 07 7月, 2021 1 次提交
    • T
      net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops · 09adf756
      Taehee Yoo 提交于
      There are two pointers in struct xfrm_state_offload, *dev, *real_dev.
      These are used in callback functions of struct xfrmdev_ops.
      The *dev points whether bonding interface or real interface.
      If bonding ipsec offload is used, it points bonding interface If not,
      it points real interface.
      And real_dev always points real interface.
      So, netdevsim should always use real_dev instead of dev.
      Of course, real_dev always not be null.
      
      Test commands:
          ip netns add A
          ip netns exec A bash
          modprobe netdevsim
          echo "1 1" > /sys/bus/netdevsim/new_device
          ip link add bond0 type bond mode active-backup
          ip link set eth0 master bond0
          ip link set eth0 up
          ip link set bond0 up
          ip x s add proto esp dst 14.1.1.1 src 15.1.1.1 spi 0x07 mode \
      transport reqid 0x07 replay-window 32 aead 'rfc4106(gcm(aes))' \
      0x44434241343332312423222114131211f4f3f2f1 128 sel src 14.0.0.52/24 \
      dst 14.0.0.70/24 proto tcp offload dev bond0 dir in
      
      Splat looks like:
      BUG: spinlock bad magic on CPU#5, kworker/5:1/53
       lock: 0xffff8881068c2cc8, .magic: 11121314, .owner: <none>/-1,
      .owner_cpu: -235736076
      CPU: 5 PID: 53 Comm: kworker/5:1 Not tainted 5.13.0-rc3+ #1168
      Workqueue: events linkwatch_event
      Call Trace:
       dump_stack+0xa4/0xe5
       do_raw_spin_lock+0x20b/0x270
       ? rwlock_bug.part.1+0x90/0x90
       _raw_spin_lock_nested+0x5f/0x70
       bond_get_stats+0xe4/0x4c0 [bonding]
       ? rcu_read_lock_sched_held+0xc0/0xc0
       ? bond_neigh_init+0x2c0/0x2c0 [bonding]
       ? dev_get_alias+0xe2/0x190
       ? dev_get_port_parent_id+0x14a/0x360
       ? rtnl_unregister+0x190/0x190
       ? dev_get_phys_port_name+0xa0/0xa0
       ? memset+0x1f/0x40
       ? memcpy+0x38/0x60
       ? rtnl_phys_switch_id_fill+0x91/0x100
       dev_get_stats+0x8c/0x270
       rtnl_fill_stats+0x44/0xbe0
       ? nla_put+0xbe/0x140
       rtnl_fill_ifinfo+0x1054/0x3ad0
      [ ... ]
      
      Fixes: 272c2330 ("xfrm: bail early on slave pass over skb")
      Signed-off-by: NTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09adf756
  18. 19 6月, 2021 1 次提交
  19. 15 6月, 2021 1 次提交
  20. 10 6月, 2021 1 次提交
  21. 04 6月, 2021 1 次提交
  22. 03 6月, 2021 9 次提交
  23. 23 4月, 2021 1 次提交
  24. 07 4月, 2021 1 次提交
  25. 01 4月, 2021 1 次提交
  26. 25 3月, 2021 1 次提交
  27. 15 3月, 2021 1 次提交
    • I
      netdevsim: Add dummy psample implementation · a8700c3d
      Ido Schimmel 提交于
      Allow netdevsim to report "sampled" packets to the psample module by
      periodically generating packets from a work queue. The behavior can be
      enabled / disabled (default) and the various meta data attributes can be
      controlled via debugfs knobs.
      
      This implementation enables both testing of the psample module with all
      the optional attributes as well as development of user space
      applications on top of psample such as hsflowd and a Wireshark dissector
      for psample generic netlink packets.
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8700c3d