1. 28 Sep, 2022 5 commits
  2. 27 Sep, 2022 31 commits
  3. 26 Sep, 2022 4 commits
    • Jesper Dangaard Brouer's avatar
      xdp: Adjust xdp_frame layout to avoid using bitfields · b860a1b9
      Jesper Dangaard Brouer authored
      Practical experience (and advice from Alexei) tell us that bitfields in
      structs lead to un-optimized assembly code. I've verified this change
      does lead to better x86_64 assembly, both via objdump and playing with
      code snippets in godbolt.org.
      
      Using scripts/bloat-o-meter shows the code size is reduced with 24
      bytes for xdp_convert_buff_to_frame() that gets inlined e.g. in
      i40e_xmit_xdp_tx_ring() which were used for microbenchmarking.
      
      Microbenchmarking results do show improvements, but very small and
      varying between 0.5 to 2 nanosec improvement per packet.
      
      The member @metasize is changed from u8 to u32. Future users of this
      area could split this into two u16 fields. I've also benchmarked with
      two u16 fields showing equal performance gains and code size reduction.
      
      The moved member @frame_sz doesn't change sizeof struct due to existing
      padding. Like xdp_buff member @frame_sz is placed next to @flags, which
      allows compiler to optimize assignment of these.
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Link: https://lore.kernel.org/r/166393728005.2213882.4162674859542409548.stgit@firesoulSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b860a1b9
    • Jakub Kicinski's avatar
      Merge branch 'improve-tsn_lib-selftests-for-future-distributed-tasks' · 49919312
      Jakub Kicinski authored
      Vladimir Oltean says:
      
      ====================
      Improve tsn_lib selftests for future distributed tasks
      
      Some of the boards I am working with are limited in the number of ports
      that they offer, and as more TSN related selftests are added, it is
      important to be able to distribute the work among multiple boards.
      A large part of implementing that is ensuring network-wide
      synchronization, but also permitting more streams of data to flow
      through the network. There is the more important aspect of also
      coordinating the timing characteristics of those streams, and that is
      also something that is tackled, although not in this modest patch set.
      The goal here is not to introduce new selftests yet, but just to lay a
      better foundation for them. These patches are a part of the cleanup work
      I've done while working on selftests for frame preemption. They are
      regression-tested with psfp.sh.
      ====================
      
      Link: https://lore.kernel.org/r/20220923210016.3406301-1-vladimir.oltean@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      49919312
    • Vladimir Oltean's avatar
      selftests: net: tsn_lib: run phc2sys in automatic mode · 162d52df
      Vladimir Oltean authored
      We can make the phc2sys helper not only synchronize a PHC to
      CLOCK_REALTIME, which is what it currently does, but also CLOCK_REALTIME
      to a PHC, which is going to be needed in distributed TSN tests.
      
      Instead of making the complexity of the arguments passed to
      phc2sys_start() explode, we can let it figure out the sync direction
      automatically, based on ptp4l's port states.
      
      Towards that goal, pass just the path to the desired ptp4l instance's
      UNIX domain socket, and remove the $if_name argument (from which it
      derives the PHC). Also adapt the one caller from the ocelot psfp.sh
      test. In the case of psfp.sh, phc2sys_start is able to properly figure
      out that CLOCK_REALTIME is the source clock and swp1's PHC is the
      destination, because of the way in which ptp4l_start for the
      UDS_ADDRESS_SWP1 was called: with slave_only=false, so it will always
      win the BMCA and always become the sync master between itself and $h1.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      162d52df
    • Vladimir Oltean's avatar
      selftests: net: tsn_lib: allow multiple isochron receivers · a7ce95ac
      Vladimir Oltean authored
      Move the PID variable for the isochron receiver into a separate
      namespace per stats port, to allow multiple receivers (and/or
      orchestration daemons) to be instantiated by the same script.
      
      Preserve the existing behavior by making isochron_do() use the default
      stats TCP port of 5000.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a7ce95ac