1. 26 Aug, 2021 25 commits
  2. 25 Aug, 2021 15 commits
    • David S. Miller's avatar
      Merge branch 'pktgen-samples-next' · e3f30ab2
      David S. Miller authored
      Juhee Kang says:
      
      ====================
      samples: pktgen: enhance the ability to print the execution results of samples
      
      This patch series improves the ability to print the execution result of pktgen
      samples by adding a line which calls the function before termination and adding
      trap SIGINT. Also, this series documents the latest pktgen usage options.
      
      Currently, pktgen samples print the execution result when terminated usually.
      However, sample03 is not working properly.
      
      This is results of sample04 and sample03:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 1
          Running... ctrl^C to stop
          Device: eth0@0
          Result: OK: 19(c5+d13) usec, 1 (60byte,0frags)
          51762pps 24Mb/sec (24845760bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample03_burst_single_flow.sh -n 1
          Running... ctrl^C to stop
      
      Because sample03 doesn't call the function which prints the execution result
      when terminated normally, unlike other samples. So the first commit solves
      this issue by adding a line which calls the function before termination.
      
      Also, all pktgen samples are able to send infinite messages per thread by
      setting the count option to 0, and pktgen is stopped by Ctrl-C. However,
      the sample besides sample{3...5} don't work appropriately because Ctrl-C stops
      the script, not just pktgen.
      
      This is results of samples:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0
          Running... ctrl^C to stop
          ^CDevice: eth0@0
          Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags)
          148597pps 71Mb/sec (71326560bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample02_multiqueue.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample06_numa_awared_queue_irq_affinity.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_bench_xmit_mode_netif_receive.sh -n 0
          Running... ctrl^C to stop
          ^C
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_bench_xmit_mode_queue_xmit.sh -n 0
          Running... ctrl^C to stop
          ^C
      
      So the second commit solves this issue by adding trap SIGINT. Also, changes
      control_c function to print_results to maintain consistency with other samples
      on the first commit and second commit.
      
      And current pktgen.rst documentation doesn't add the latest pktgen sample
      usage options such as count and IPv6, and so on. Also, the old pktgen
      sample scripts are still included in the document. The old scripts were removed
      by the commit a4b6ade8 ("samples/pktgen: remove remaining old pktgen
      sample scripts").
      
      Thus, the last commit documents the latest pktgen sample usage and removes
      old sample scripts. And fixes a minor typo.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3f30ab2
    • Juhee Kang's avatar
      pktgen: document the latest pktgen usage options · 246b184f
      Juhee Kang authored
      Currently, the pktgen.rst documentation doesn't cover the latest pktgen
      sample usage options such as count and IPv6, and so on. Also, this
      documentation includes the old sample scripts which are no longer use
      because it was removed by the commit a4b6ade8 ("samples/pktgen :
      remove remaining old pktgen sample scripts")
      
      Thus, this commit documents pktgen sample usage using the latest options
      and removes old sample scripts, and fixes a minor typo.
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      246b184f
    • Juhee Kang's avatar
      samples: pktgen: add trap SIGINT for printing execution result · 6c882bdc
      Juhee Kang authored
      All pktgen samples can send indefinitely num messages per thread by
      setting the count option to 0(-n 0). If running sample with setting
      count 0 and press Ctrl-C to stop this program, the program prints the
      result of the execution so far. Currently, the samples besides
      sample{3...5} don't work properly. Because Ctrl-C stops the script, not
      just pktgen.
      
      This is results of samples:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0
          Running... ctrl^C to stop
          ^CDevice: eth0@0
          Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags)
          148597pps 71Mb/sec (71326560bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0
          Running... ctrl^C to stop
          ^C
      
      In order to solve this, this commit adds trap SIGINT. Also, this commit
      changes control_c function to print_result to maintain consistency with
      other samples.
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c882bdc
    • Juhee Kang's avatar
      samples: pktgen: fix to print when terminated normally · c0e9422c
      Juhee Kang authored
      Currently, most pktgen samples print the execution result when the
      program is terminated normally. However, sample03 doesn't work
      appropriately.
      
      This is results of samples:
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 1
          Running... ctrl^C to stop
          Device: eth0@0
          Result: OK: 19(c5+d13) usec, 1 (60byte,0frags)
          51762pps 24Mb/sec (24845760bps) errors: 0
      
          # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample03_burst_single_flow.sh -n 1
          Running... ctrl^C to stop
      
      The reason why it doesn't print the execution result when the program is
      terminated usually is that sample03 doesn't call the function which
      prints the result, unlike other samples.
      
      So, this commit solves this issue by calling the function before
      termination. Also, this commit changes control_c function to
      print_result to maintain consistency with other samples.
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0e9422c
    • David S. Miller's avatar
      Merge branch 'octeontx2-traffic-shaping' · 9270c565
      David S. Miller authored
      Sunil Goutham says:
      
      ====================
      Octeontx2: Traffic shaping and SDP link config support
      
      This patch series adds support for traffic shaping configuration
      on all silicons available after 96xx C0. And also adds SDP link
      related configuration needed when Octeon is connected as an end-point
      and traffic needs to flow from end-point to host and vice versa.
      
      Series also has other changes like
      - New mbox messages in admin function driver for PF/VF drivers
        to retrieve available HW resource count. HW resources like block LFs,
        bandwidth profiles etc are covered.
      - Added PTP device ID for new CN10K and 95O silicons.
      - etc
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9270c565
    • Sunil Goutham's avatar
      octeontx2-af: Add mbox to retrieve bandwidth profile free count · 66c312ea
      Sunil Goutham authored
      Added mbox for PF/VF drivers to retrieve current ingress bandwidth
      profile free count. Also added current policer timeunit
      configuration info based on which ratelimiting decisions can be
      taken by PF/VF drivers.
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66c312ea
    • Sunil Goutham's avatar
      octeontx2-af: Remove channel verification while installing MCAM rules · 18603683
      Sunil Goutham authored
      New usecases are popping up where in user wants to install common MCAM
      filters for all interfaces. Having channel verification will result in
      duplicating such MCAM filters for each of the ingress interface. Hence
      removed channel verification.
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18603683
    • Subbaraya Sundeep's avatar
      octeontx2-af: Add PTP device id for CN10K and 95O silcons · a8b90c9d
      Subbaraya Sundeep authored
      CN10K slicon has different device id for PTP device.
      Hence this patch updates the driver with new id.
      Though ptp driver being a separate driver AF manages
      configuring PTP block by all PFs. To manage ptp, AF
      driver checks in its probe whether
      1. ptp hardware device found on silicon
      2. A driver is bound to ptp device
      3. The ptp driver probe is successful
      
      In failure of cases 1 and 3, AF proceeds with out ptp
      and for case 2 defers the probe. This patch refactors
      code also to check for all the PTP device ids given in
      ptp device ids table for case 1.
      
      Also added PTP device ID for 95O silicon
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8b90c9d
    • George Cherian's avatar
      octeontx2-af: Add free rsrc count mbox msg · 275e5d17
      George Cherian authored
      Upon receiving the MBOX_MSG_FREE_RSRC_CNT, the AF will find out the
      current number of free resources and reply it back to the requester. No
      guarantee is given on the future state of the free resources yet.
      If another requester sends MBOX_MSG_ATTACH_RESOURCES after this call,
      the number of available resources might change.
      Signed-off-by: default avatarGeorge Cherian <george.cherian@marvell.com>
      Signed-off-by: default avatarStanislaw Kardach <skardach@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      275e5d17
    • Radha Mohan Chintakuntla's avatar
      octeontx2-af: Add SDP interface support · fe1939bb
      Radha Mohan Chintakuntla authored
      Added support for packet IO via SDK links which is used when
      Octeon is connected as a end-point. Traffic host to end-point
      and vice versa flow through SDP links. This patch also support
      dual SDP blocks supported in 98xx silicon.
      Signed-off-by: default avatarRadha Mohan Chintakuntla <radhac@marvell.com>
      Signed-off-by: default avatarNalla Pradeep <pnalla@marvell.com>
      Signed-off-by: default avatarSubrahmanyam Nilla <snilla@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe1939bb
    • Harman Kalra's avatar
      octeontx2-af: nix and lbk in loop mode in 98xx · aefaa8c7
      Harman Kalra authored
      In 98xx, there are 2 NIX blocks and 4 LBK blocks present. The way
      these NIX-LBK should be configured depends on the use case. By
      default loopback functionality is supported in AF VF pairs which
      are attached to NIX0 and NIX1 LFs alternatively to ensure load
      balancing. NIX0 transmits a packet to LBK1 which will be received
      by NIX1 and packet transmitted by NIX1 will get received by NIX0 via
      LBK2.
      
      There are some requirements where only one AF VF is used and respective
      NIX is expected to operate in a mode where it can receive it own packet
      back. This can be achieved if NIX0 sends packet to LBK0 and not LBK1.
      Adding a flag in LF alloc request mailbox which can setup NIX0 to use
      LBK0 and NIX1 can use LBK3.
      Signed-off-by: default avatarHarman Kalra <hkalra@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aefaa8c7
    • Subbaraya Sundeep's avatar
      octeontx2-pf: cleanup transmit link deriving logic · 039190bb
      Subbaraya Sundeep authored
      Unlike OcteonTx2, the channel numbers used by CGX/RPM
      and LBK on CN10K silicons aren't fixed in HW. They are
      SW programmable, hence we cannot derive transmit link
      from static channel numbers anymore. Get the same from
      admin function via mailbox.
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      039190bb
    • Jerin Jacob's avatar
      octeontx2-af: Allow to configure flow tag LSB byte as RSS adder · 72e192a1
      Jerin Jacob authored
      Before C0 HW revision, The RSS adder was computed based the
      following static formula.
      
      rss_adder<7:0> = flow_tag<7:0> ^ flow_tag<15:8> ^
      flow_tag<23:16> ^ flow_tag<31:24>
      
      The above scheme has the following drawbacks:
      1) It is not in line with other standard NIC behavior.
      2) There can be an SW use case where SW can compute the hash
      upfront using Toeplitz function and predict the queue selection
      to optimize some packet lookup function. The nonstandard
      way of doing XOR makes the consumer to not predict the queue selection.
      
      C0 HW revision onwards, The HW can configure the
      rss_adder<7:0> as flow_tag<7:0> to align with standard NICs.
      
      This patch adds an option to select legacy RSS adder mode
      vs standard NIC behavior by setting NIX_LF_RSS_TAG_LSB_AS_ADDER flag.
      
      Since this bit field is used as reserved in old HW revisions,
      No need to have an additional HW version check.
      Signed-off-by: default avatarJerin Jacob <jerinj@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72e192a1
    • Nithin Dabilpuram's avatar
      octeontx2-af: enable tx shaping feature for 96xx C0 · d0641163
      Nithin Dabilpuram authored
      Starting from 96xx C0 onwards all silicons support traffic shaping.
      This patch enables that feature along with other changes
      - When PIR/CIR shaping config is modified, toggle SW_XOFF
        for config to take effect
      - Before SMQ flush, clear SW_XOFF at all parent schedulers
      - Support to read current transmit scheduler configuration via mbox
      Signed-off-by: default avatarNithin Dabilpuram <ndabilpuram@marvell.com>
      Signed-off-by: default avatarGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0641163
    • Cai Huoqing's avatar
      net: ethernet: actions: Add helper dependency on COMPILE_TEST · fbcf8a34
      Cai Huoqing authored
      it's helpful for complie test in other platform(e.g.X86)
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbcf8a34