Xilinx-CNS / tcpdirect

AMD TCPDirect ultra low latency kernel bypass TCP and UDP implementation for AMD Solarflare network adapters, to be used with corresponding versions of Onload®️ at https://github.com/Xilinx-CNS/onload. The stable branch is currently `v8_1`.
22 stars 17 forks source link

ON-15038: View zf attibutes from zf_stackdump #19

Closed KalepuAMD closed 3 months ago

KalepuAMD commented 6 months ago

Added to view attributes in the output of the zf_stackdump dump

dellr250u:~/devel/fgit/test-onload-git/tcpdirect/build/gnu_x86_64/bin$ ./zf_stackdump dump
============================================================
onload version=27eb4307c8 2023-11-15 onload-8.1.2
tcpdirect version=8.1.3 onload-8.1 tcpdirect-8.1 0c08e35 2024-05-03 v8_1
name=ens1f0/10a interface=ens1f0 vlan_id=65535
  pool: pkt_bufs_n=21632 free=17537
  config: tcp_timewait_ticks=666 tcp_finwait_ticks=666 ctpio_threshold=64
  config: tcp_initial_cwnd=0 ms_per_tcp_tick=90
  alts: n_alts=0
  stats: ring_refill_nomem=0 cplane_alien_ifindex=0
         tcp_retransmits=0
  discards: discard_csum_bad=0 discard_mcast_mismatch=0
         discard_crc_bad=0 discard_trunc=0 discard_rights=0
         discard_ev_error=0 discard_other=0 discard_inner_csum_bad=0
         non_tcpudp=0
  hwport_to_nicno: [0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,]
nic0: vi=266 vi_flags=1000000 nic_flags=1 intf=ens1f0 index=10 hw=1C1
  txq: pio_buf_size=4096 added=0 removed=0
============================================================
TCP LISTEN ens1f0/10a:0 lcl=192.168.138.232:9001
  acceptq: no
------------------------------------------------------------
---------------------attributes-------------------------------
tx_ring size= 1024
rx_ring size= 4096
tx_timestamping= 0
rx_timestamping= 0
ctpio= 1
ctpio_mode= ct
pio= 1
reactor_spin_count= 128
tcp_timewait_wait= 60000
alt_buf_size= 40960
alt_count= 0
rx_ring_refill_batch_size= 16
tcp_alt_ack_rewind= 65536
tcp_delayed_ack= 1
tcp_finwait_ms= 60000
tcp_wait_for_time_ms= 0
ctpio_max_frame_len= -1
force_separate_tx_vi= 0
rx_ring_refill_interval= 1
udp_ttl= 64
log_level= 286331153
============================================================
onload version=27eb4307c8 2023-11-15 onload-8.1.2
tcpdirect version=8.1.3 onload-8.1 tcpdirect-8.1 0c08e35 2024-05-03 v8_1
name=ens1f1/10a interface=ens1f1 vlan_id=65535
  pool: pkt_bufs_n=17536 free=17025
  config: tcp_timewait_ticks=666 tcp_finwait_ticks=666 ctpio_threshold=-1
  config: tcp_initial_cwnd=0 ms_per_tcp_tick=90
  alts: n_alts=0
  stats: ring_refill_nomem=0 cplane_alien_ifindex=0
         tcp_retransmits=0
  discards: discard_csum_bad=0 discard_mcast_mismatch=0
         discard_crc_bad=0 discard_trunc=0 discard_rights=0
         discard_ev_error=0 discard_other=0 discard_inner_csum_bad=0
         non_tcpudp=0
  hwport_to_nicno: [-1,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,]
nic0: vi=266 vi_flags=1000000 nic_flags=1 intf=ens1f1 index=11 hw=1C1
  txq: pio_buf_size=4096 added=0 removed=0
============================================================
TCP LISTEN ens1f1/10a:0 lcl=192.168.130.232:9001
  acceptq: no
------------------------------------------------------------
---------------------attributes-------------------------------
tx_ring size= 512
rx_ring size= 512
tx_timestamping= 0
rx_timestamping= 0
ctpio= 1
ctpio_mode= sf-np
pio= 2
reactor_spin_count= 128
tcp_timewait_wait= 60000
alt_buf_size= 40960
alt_count= 0
rx_ring_refill_batch_size= 16
tcp_alt_ack_rewind= 65536
tcp_delayed_ack= 1
tcp_finwait_ms= 60000
tcp_wait_for_time_ms= 0
ctpio_max_frame_len= -1
force_separate_tx_vi= 0
rx_ring_refill_interval= 1
udp_ttl= 64
log_level= 286331153

Added option to view only attributes zf_stackdump attr

dellr250u:~/devel/fgit/test-onload-git/tcpdirect/build/gnu_x86_64/bin$ ./zf_stackdump attr
============================================================
ens1f1/10a id=14    pid=122818
---------------------attributes-------------------------------
tx_ring size= 512
rx_ring size= 512
tx_timestamping= 0
rx_timestamping= 0
ctpio= 1
ctpio_mode= sf-np
pio= 2
reactor_spin_count= 128
tcp_timewait_wait= 60000
alt_buf_size= 40960
alt_count= 0
rx_ring_refill_batch_size= 16
tcp_alt_ack_rewind= 65536
tcp_delayed_ack= 1
tcp_finwait_ms= 60000
tcp_wait_for_time_ms= 0
ctpio_max_frame_len= -1
force_separate_tx_vi= 0
rx_ring_refill_interval= 1
udp_ttl= 64
log_level= 286331153
KalepuAMD commented 5 months ago

I discussed with @ibeecraft-amd ; I will make another PR or commit for updating TCPdirect user guide for this.

ibeecraft-amd commented 4 months ago

I discussed with @ibeecraft-amd ; I will make another PR or commit for updating TCPdirect user guide for this.

LGTM with the addition of the documentation.