1. 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
  2. 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
  3. 04 Nov, 2015 1 commit
  4. 03 Nov, 2015 1 commit
  5. 21 Oct, 2015 1 commit
    • Gilles Chanteperdrix's avatar
      rtnet: transfer skb ownership when sending · 91b33022
      Gilles Chanteperdrix authored
      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
  6. 01 Oct, 2015 1 commit
  7. 16 Nov, 2014 7 commits