Skip to content

Commit

Permalink
script: Publish data on af_packet when af_xdp is not available in vs1
Browse files Browse the repository at this point in the history
In current test implementation, vs1 runs AF_PACKET test first before AF_XDP tests.
At the end of the AF_XDP test, both calculation result will be shown to the users.

However, currently AF_PACKET result will not even be calculated if txrx-tsn prematurely exits in the AF_XDP test phase (due
unsupported AF_XDP etc).

This change is to support af_packet calculation if the data is available regardless of AF_XDP test execution result.

Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
  • Loading branch information
AzuraTarmiziIntel authored and ws-intel committed Nov 3, 2022
1 parent 9f2ff51 commit 1e6aa2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions shell/vs1b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ else

if ! ps -p $TXRX_PID > /dev/null; then
echo -e "\ntxrx-tsn exited prematurely. vs1b.sh script will be stopped."
stop_if_empty "afpkt-rxtstamps.txt"
calc_rx_u2u "afpkt-rxtstamps.txt"
calc_rx_duploss "afpkt-rxtstamps.txt" $NUMPKTS
save_result_files $(basename $0 .sh) $NUMPKTS $SIZE $INTERVAL $XDP_MODE $PLAT
exit 1
fi

Expand Down
4 changes: 1 addition & 3 deletions src/txrx.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,9 @@ struct user_opt {
/* XDP-specific */
#ifdef WITH_XDP
struct xsk_info *xsk; //XDP-socket and ring information
#endif
/* x_opt can be defined regardless of if_xdp.h is available or not */
struct xsk_opt x_opt; //XDP-specific mandatory user params
#endif

/* XDP-specific options*/
/* Currently for txrx-afxdp only. */
uint8_t xdp_mode; //XDP mode: skb/nc/zc
uint8_t enable_poll; //XDP poll mode when sending/receiving
Expand Down

0 comments on commit 1e6aa2e

Please sign in to comment.