1. 04 Feb, 2019 1 commit
  2. 28 Oct, 2018 1 commit
    • Philippe Gerum's avatar
      net/stack: export services to switch interface up/down · 05cc9c99
      Philippe Gerum authored
      
      
      We may want to force a rtnet interface up, and more likely down before
      unloading a driver module.
      
      Export the ioctl() code which handles the IOC_RT_IFUP/IFDOWN core
      ioctl requests as standalone routines. The locking model remains
      unchanged, with ioctl() requests and direct service calls serializing
      on the per-device lock.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      05cc9c99
  3. 03 Jul, 2018 1 commit
    • Philippe Gerum's avatar
      net: create sysfs nodes for net devices · 20818d45
      Philippe Gerum authored
      Each rtnet device registered with the stack is represented by a node
      into /sys/devices/virtual/rtnet/.
      
      Setting the address of the real device probed by the kernel into the
      rtnet_device.sysbind field before calling rt_register_rtnetdev(),
      causes the "adapter" symlink to be installed in the newly created
      attribute directory, pointing at that device.
      
      e.g.
      
      static int probe_handler(struct pci_dev *pdev, const struct pci_device_id *ent)
      {
      	...
      	rtdev->sysbind = &pdev->dev;
      	...
      	ret = rt_register_rtnetdev(rtdev);
      	...
      }
      
      $ ls -l /sys/devices/virtual/rtnet/
      total 0
      drwxr-xr-x    2 root     root             0 Mar 30 12:50 enp1s0
      drwxr-xr-x    2 root     root             0 Mar 30 12:50 rtlo
      
      $ ls -l /sys/devices/virtual/rtnet/enp1s0/
      total 0
      lrwxrwxrwx    1 root     root             0 Mar 30 12:51 adapter -> ../../../pci0000:00/0000:00:13.0/0000:01:00.0
      lrwxrwxrwx    1 root     root             0 Mar 30 12:51 subsystem -> ../../../../class/rtnet
      -rw-r--r--    1 root     root          4096 Mar 30 12:50 uevent
      20818d45
  4. 08 Mar, 2018 1 commit
  5. 04 Nov, 2015 1 commit
  6. 21 Oct, 2015 1 commit
    • Gilles Chanteperdrix's avatar
      rtnet: transfer skb ownership when sending · 91b33022
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      to the device pool, to avoid crashes when a socket is destroyed while it
      has buffers queued in the device transmit ring. This is a consequence of
      commit 45474093, buffers from the socket
      pool no longer prevent the socket from being destroyed.
      
      At this chance, rename the device pool "rx_pool" to "dev_pool", as it is
      now also used for transmission.
      91b33022
  7. 16 Nov, 2014 6 commits
    • Gilles Chanteperdrix's avatar
      rtnet: add more netdev compatibility functions · 0d903b8b
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      Needed for newer versions of drivers
      0d903b8b
    • Gilles Chanteperdrix's avatar
      rtnet: Kconfig fixes · a4bbc3c7
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      rtcap and rtnetproxy must be enabled as modules
      And some kernel configuration options are required for rtnet to even compile
      a4bbc3c7
    • Gilles Chanteperdrix's avatar
      rtnet: reduce the compat cruft · a95d1abe
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      a95d1abe
    • Gilles Chanteperdrix's avatar
      rtnet: rtskb_pool changes (2) · 72308768
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      Move the per-driver rtskb_pool to rtnet_devices. At this chance, rework
      rtdev_reference/rtdev_dereference to lock/unlock module loading, also lock
      the module when an interface is up, so that an interface must be down in order
      to allow removing it.
      
      A new call rtnetdev_alloc_rtskb is added to be used instead of dev_alloc_rtskb
      to allocate devices from the device pool, its first argument being a pointer to
      a device instead of a pointer to a pool.
      72308768
    • Gilles Chanteperdrix's avatar
      rtnet: rtskb_pool changes · 0888f326
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      An rtskb_pool now has lock/unlock operations, called for the first dequeued
      buffer and the last queued one. At this chance, the struct rtskb_pool is
      introduced, and used everywhere a pool was used.
      
      rtskb_module_pool_init creates an rtskb_pool whose lock/unlock operations
      lock a module (the module from which rtskb_module_pool_init was called).
      
      The socket skb_pool lock/unlocks the socket rtdm_fd.
      
      Drivers pool not fixed yet.
      0888f326
    • Gilles Chanteperdrix's avatar
      rtnet: import · 106ffba7
      Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
      106ffba7