1. 12 May, 2021 5 commits
    • Philippe Gerum's avatar
    • Philippe Gerum's avatar
      drivers/net: cfg: fix config file load up · 07a626a1
      Philippe Gerum authored
      
      
      set_fs() is on its way out, so we cannot open code a file read
      operation by calling the VFS handler directly anymore, faking a user
      address space.
      
      We do have kernel interfaces for loading files though, particularly
      kernel_read_file(). So let's use that one for loading the
      configuration file contents. Unfortunately, the signature of this
      service changed during the 5.9-rc cycle, so we have to resort to an
      ugly wrapper to cope with all supported kernels once again. Sigh.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      07a626a1
    • Philippe Gerum's avatar
      drivers/net: checksum: convert to memcpy+csum · a6e9faa0
      Philippe Gerum authored
      
      
      Since v5.9-rc1, csum_partial_copy_nocheck() forces a zero seed as its
      last argument to csum_partial(). According to #cc44c17baf7f3, passing
      a non-zero value would not even yield the proper result on some
      architectures. However, other locations still expect a non-zero csum
      seed to be used in the next computation.
      
      Meanwhile, some benchmarking (*) revealed that folding copy and
      checksum operations may not be as optimal as one would have thought
      when the caches are under pressure, so we switch to a split version,
      first memcpy() then csum_partial(), so as to always benefit from
      memcpy() optimizations. As a bonus, we don't have to wrap calls to
      csum_partial_copy_nocheck() to follow the kernel API change. Instead
      we can provide a single implementation based on csum_partial() which
      works with any kernel version.
      
      (*) Below are benchmark figures of the csum_copy (folded) vs csum+copy
      (split) performances in idle vs busy scenarios. Busy means
      hackbench+dd loop streaming 128M in the background from zero -> null,
      in order to badly trash the D-caches while the test runs. Three
      different packet sizes are submitted to checksumming (32, 1024, 1500
      bytes), all figures in nanosecs.
      
      iMX6QP (Cortex A9)
      ------------------
      
      === idle
      
      CSUM_COPY 32b: min=333, max=1333, avg=439
      CSUM_COPY 1024b: min=1000, max=2000, avg=1045
      CSUM_COPY 1500b: min=1333, max=2000, avg=1333
      COPY+CSUM 32b: min=333, max=1333, avg=443
      COPY+CSUM 1024b: min=1000, max=2334, avg=1345
      COPY+CSUM 1500b: min=1666, max=2667, avg=1737
      
      === busy
      
      CSUM_COPY 32b: min=333, max=4333, avg=466
      CSUM_COPY 1024b: min=1000, max=5000, avg=1088
      CSUM_COPY 1500b: min=1333, max=5667, avg=1393
      COPY+CSUM 32b: min=333, max=1334, avg=454
      COPY+CSUM 1024b: min=1000, max=2000, avg=1341
      COPY+CSUM 1500b: min=1666, max=2666, avg=1745
      
      C4 (Cortex A55)
      ---------------
      
      === idle
      
      CSUM_COPY 32b: min=125, max=791, avg=130
      CSUM_COPY 1024b: min=541, max=834, avg=550
      CSUM_COPY 1500b: min=708, max=1875, avg=740
      COPY+CSUM 32b: min=125, max=167, avg=133
      COPY+CSUM 1024b: min=541, max=625, avg=553
      COPY+CSUM 1500b: min=708, max=750, avg=730
      
      === busy
      
      CSUM_COPY 32b: min=125, max=792, avg=133
      CSUM_COPY 1024b: min=500, max=2000, avg=552
      CSUM_COPY 1500b: min=708, max=1542, avg=744
      COPY+CSUM 32b: min=125, max=375, avg=133
      COPY+CSUM 1024b: min=500, max=709, avg=553
      COPY+CSUM 1500b: min=708, max=916, avg=743
      
      x86 (atom x5)
      -------------
      
      === idle
      
      CSUM_COPY 32b: min=67, max=590, avg=70
      CSUM_COPY 1024b: min=245, max=385, avg=251
      CSUM_COPY 1500b: min=343, max=521, avg=350
      COPY+CSUM 32b: min=101, max=679, avg=117
      COPY+CSUM 1024b: min=296, max=379, avg=298
      COPY+CSUM 1500b: min=399, max=502, avg=404
      
      == busy
      
      CSUM_COPY 32b: min=65, max=709, avg=71
      CSUM_COPY 1024b: min=243, max=702, avg=252
      CSUM_COPY 1500b: min=340, max=1055, avg=351
      COPY+CSUM 32b: min=100, max=665, avg=120
      COPY+CSUM 1024b: min=295, max=669, avg=298
      COPY+CSUM 1500b: min=399, max=686, avg=403
      
      arm64 which has no folded csum_copy implementation makes the best of
      using the split copy+csum path. All architectures seem to benefit from
      optimized memcpy under load when it comes to the worst case execution
      time. x86 is less prone to jittery under cache trashing than others as
      usual, but even there, the max. figures for csum+copy in busy context
      look pretty much on par with the csum_copy version. Therefore,
      converting all users to csum+copy makes sense.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      a6e9faa0
    • Philippe Gerum's avatar
      cobalt/memory: fix __vmalloc() calls · cb76faf4
      Philippe Gerum authored
      
      
      Since kernel v5.8, __vmalloc() does not take protection bits as
      PROT_KERNEL is now wired in. Therefore we cannot disable the cache for
      the UMM segment via the allocation call directly anymore.
      
      This said, we don't support any CPU architecture exhibiting cache
      aliasing braindamage anymore either (was armv4/v5), so let's convert
      to the new __vmalloc() call format without bothering for cache
      settings.
      Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
      cb76faf4
    • Jan Kiszka's avatar
      ci: Trigger xenomai-images child pipeline corresponding to main branches · add93705
      Jan Kiszka authored
      
      
      This couples pushing to next and stable branches with running
      xenomai-images, and then only the affected child pipeline. Precondition
      is setting XENOMAI_IMAGES_TOKEN as protected CI/CD variable.
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      add93705
  2. 10 May, 2021 1 commit
  3. 09 May, 2021 4 commits
  4. 05 May, 2021 5 commits
  5. 13 Apr, 2021 1 commit
  6. 12 Apr, 2021 1 commit
  7. 11 Apr, 2021 6 commits
  8. 07 Apr, 2021 8 commits
  9. 15 Mar, 2021 4 commits
    • Jan Kiszka's avatar
      cobalt: Avoid reading time twice via xnstat_exectime_update · aacfaf8b
      Jan Kiszka authored
      
      
      This macro may unroll to instantiating 'date' twice. If that is a call
      to some get-time function, as via xnstat_exectime_switch, we needlessly
      do that twice.
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      aacfaf8b
    • Jan Kiszka's avatar
      cobalt/posix/mqueue: Avoid returning internal EADV as error · 5f14ea8a
      Jan Kiszka authored
      In contrast to real RTDM devices, message queues have no fallback path
      to Linux in userspace. Thus, EADV is neither needed nor detected by
      libcobalt. Avoid leaking it from RTDM to the mq syscall interface.
      
      Fixes: 2db562ad
      
       ("cobalt: switch hand over status to -EADV for non-RTDM fd")
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      5f14ea8a
    • Jan Kiszka's avatar
      ci: Do not install unneeded crosstools · 1b89f045
      Jan Kiszka authored
      
      
      Make the package set arch-specific to save some bytes and seconds.
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      1b89f045
    • Stephane Grosjean's avatar
      RT-socket-CAN: Add support of PEAK PCAN-PCIe FD cards family · 88d10a9d
      Stephane Grosjean authored
      This patch includes the driver that supports the CANFD interfaces of
      the PCAN-PCIe FD family. This driver is largely inspired by the peak_pciefd
      driver included in the kernel since version 4.12. Except for the
      differences related to the RTDM model, this driver differs from the
      socket-CAN driver by the following points:
      
      . CAN 2.0 a/b support only (CAN-FD not available in rt-socket-can)
      . all interrupts are required (or released) when loading (or unloading)
        the module, not when activating (or deactivating) the CAN interface as in
        the socket-CAN model. Only hardware interruptions are enabled (or
        disabled) when the rtcan interface is set up (or down).
      . This way of operating allows the usage of the MSI mode: if CONFIG_PCI_MSI
        is defined while CONFIG_XENO_OPT_SHIRQ is not, then the driver activates
        the MSI mode by default. The legacy INTA mode is used otherwise. In case
        CONFIG_PCI_MSI is defined, the parameter module "usemsi" allows to c...
      88d10a9d
  10. 08 Mar, 2021 5 commits