.. _global: .. index:: pair: namespace; global Global Namespace ================ .. toctree:: :hidden: struct_net_drv_conn.rst struct_net_drv_flow.rst struct_net_drv_rss_ctx.rst struct_net_drv_xdp_cfg.rst struct_net_drv_xdp_sock.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef struct :ref:`net_drv_rss_ctx` :ref:`net_drv_rss_ctx`; typedef struct :ref:`net_drv_xdp_sock` :ref:`net_drv_xdp_sock`; typedef struct :ref:`net_drv_xdp_cfg` :ref:`net_drv_xdp_cfg`; typedef struct :ref:`net_drv_conn` :ref:`net_drv_conn`; typedef struct :ref:`net_drv_flow` :ref:`net_drv_flow`; // structs struct :ref:`net_drv_conn`; struct :ref:`net_drv_flow`; struct :ref:`net_drv_rss_ctx`; struct :ref:`net_drv_xdp_cfg`; struct :ref:`net_drv_xdp_sock`; // global functions te_errno :ref:`net_drv_rss_send_check_stats`(rcf_rpc_server* sender_rpcs, int sender_s, const struct sockaddr* sender_addr, rcf_rpc_server* receiver_rpcs, int receiver_s, const struct sockaddr* receiver_addr, rpc_socket_type sock_type, unsigned int exp_queue, unsigned int bpf_id, const char* vpref); te_errno :ref:`net_drv_rss_send_get_stats`(rcf_rpc_server* sender_rpcs, int sender_s, const struct sockaddr* sender_addr, rcf_rpc_server* receiver_rpcs, int receiver_s, const struct sockaddr* receiver_addr, rpc_socket_type sock_type, unsigned int bpf_id, tapi_bpf_rxq_stats** stats, unsigned int* stats_count, const char* vpref); te_errno :ref:`net_drv_rss_check_set_hfunc`(const char* ta, const char* if_name, unsigned int rss_context, const char* func_name); static void :ref:`net_drv_rss_get_check_hkey`(const char* ta, const char* if_name, unsigned int rss_context, uint8_t** key, size_t* len); void :ref:`net_drv_rss_ctx_prepare`(:ref:`net_drv_rss_ctx`* ctx, const char* ta, const char* if_name, unsigned int rss_ctx); void :ref:`net_drv_rss_ctx_release`(:ref:`net_drv_rss_ctx`* ctx); te_errno :ref:`net_drv_rss_ctx_change_key`(:ref:`net_drv_rss_ctx`* ctx, uint8_t* hash_key, unsigned int key_len); te_errno :ref:`net_drv_rss_predict`(:ref:`net_drv_rss_ctx`* ctx, const struct sockaddr* src_addr, const struct sockaddr* dst_addr, unsigned int* hash_out, unsigned int* idx_out, unsigned int* queue_out); void :ref:`net_drv_rx_rules_check_table_size`(const char* ta, const char* if_name, uint32_t* table_size); void :ref:`net_drv_rx_rules_check_spec_loc`(const char* ta, const char* if_name); te_errno :ref:`net_drv_rx_rules_find_loc`(const char* ta, const char* if_name, int64_t* location); void :ref:`net_drv_add_tcpudp_rx_rule`(const char* ta, const char* if_name, rpc_socket_type sock_type, const struct sockaddr* src_addr, const struct sockaddr* src_mask, const struct sockaddr* dst_addr, const struct sockaddr* dst_mask, unsigned int queue, const char* rule_name); te_errno :ref:`net_drv_xdp_adjust_rx_size`(const char* ta, const char* if_name, :ref:`net_drv_xdp_cfg`* cfg); te_errno :ref:`net_drv_xdp_create_sock`(rcf_rpc_server* rpcs, const char* if_name, unsigned int queue_id, :ref:`net_drv_xdp_cfg`* cfg, int map_fd, :ref:`net_drv_xdp_sock`* sock); te_errno :ref:`net_drv_xdp_destroy_sock`(rcf_rpc_server* rpcs, :ref:`net_drv_xdp_sock`* sock); void :ref:`net_drv_xdp_create_socks`(rcf_rpc_server* rpcs, const char* if_name, :ref:`net_drv_xdp_cfg`* cfg, int map_fd, unsigned int socks_num, :ref:`net_drv_xdp_sock`** socks_out); te_errno :ref:`net_drv_xdp_destroy_socks`(rcf_rpc_server* rpcs, :ref:`net_drv_xdp_sock`* socks, unsigned int socks_num); void :ref:`net_drv_xdp_echo`(rcf_rpc_server* rpcs_udp, int s_udp, const struct sockaddr* dst_addr, rcf_rpc_server* rpcs_xdp, :ref:`net_drv_xdp_sock`* socks, unsigned int socks_num, unsigned int exp_sock); void :ref:`net_drv_conn_create`(:ref:`net_drv_conn`* conn); te_errno :ref:`net_drv_conn_destroy`(:ref:`net_drv_conn`* conn); void :ref:`net_drv_flow_prepare`(:ref:`net_drv_flow`* flow); void :ref:`net_drv_flow_start`(:ref:`net_drv_flow`* flow); void :ref:`net_drv_flow_finish`(:ref:`net_drv_flow`* flow); te_errno :ref:`net_drv_flow_destroy`(:ref:`net_drv_flow`* flow); int :ref:`net_drv_ethtool_reset`(rcf_rpc_server* rpcs, int s, const char* if_name, unsigned int flags, unsigned int* ret_flags); void :ref:`net_drv_open_ptp_fd`(rcf_rpc_server* rpcs, const char* if_name, int* fd, const char* vpref); double :ref:`net_drv_timespec_diff`(tarpc_timespec* tsa, tarpc_timespec* tsb); double :ref:`net_drv_ptp_clock_time_diff`(tarpc_ptp_clock_time* tsa, tarpc_ptp_clock_time* tsb); void :ref:`net_drv_ptp_offs_check_dev_avg`(double* values, unsigned int number, double avg_diff); void :ref:`net_drv_ptp_offs_check_dev_gettime`(rcf_rpc_server* rpcs, int ptp_fd, rpc_clock_id sys_clock, double ptp_offs); int :ref:`rpc_net_drv_too_many_rx_rules`(rcf_rpc_server* rpcs, int fd, const char* if_name, const struct sockaddr* src_addr, const struct sockaddr* dst_addr, rpc_socket_type sock_type, te_bool any_location, unsigned int queues_num, unsigned int* rules_count, te_errno* add_errno); int64_t :ref:`rpc_net_drv_send_pkts_exact_delay`(rcf_rpc_server* rpcs, int s, unsigned int delay, unsigned int time2run); int64_t :ref:`rpc_net_drv_recv_pkts_exact_delay`(rcf_rpc_server* rpcs, int s, unsigned int time2wait); char* :ref:`net_drv_driver_name`(const char* ta); te_bool :ref:`net_drv_driver_unloadable`(const char* ta, const char* module); te_errno :ref:`net_drv_driver_set_loaded`(const char* ta, const char* module, te_bool load); void :ref:`net_drv_req_if_feature_change`(const char* ta, const char* if_name, const char* feature_name); void :ref:`net_drv_set_if_feature`(const char* ta, const char* if_name, const char* feature_name, int req_status); void :ref:`net_drv_try_set_if_feature`(const char* ta, const char* if_name, const char* feature_name, int req_status); size_t :ref:`net_drv_send_recv_check`(rcf_rpc_server* rpcs_sender, int s_sender, rcf_rpc_server* rpcs_receiver, int s_receiver, const char* vpref); size_t :ref:`net_drv_sendto_recv_check`(rcf_rpc_server* rpcs_sender, int s_sender, const struct sockaddr* dst_addr, rcf_rpc_server* rpcs_receiver, int s_receiver, const char* vpref); size_t :ref:`net_drv_sendto_recv_check_may_loss`(rcf_rpc_server* rpcs_sender, int s_sender, const struct sockaddr* dst_addr, rcf_rpc_server* rpcs_receiver, int s_receiver, const char* vpref); void :ref:`net_drv_conn_check`(rcf_rpc_server* rpcs1, int s1, const char* s1_name, rcf_rpc_server* rpcs2, int s2, const char* s2_name, const char* vpref); te_errno :ref:`net_drv_cat_all_files`(rcf_rpc_server* rpcs, uint32_t timeout, const char* path_fmt, ...); te_errno :ref:`net_drv_set_check_mac`(const char* ta, const char* if_name, const void* mac_addr); void :ref:`net_drv_set_mtu`(const char* ta, const char* if_name, int mtu, const char* where); te_errno :ref:`net_drv_neigh_nodes_count`(const char* ta, unsigned int* num); te_errno :ref:`net_drv_wait_neigh_nodes_recover`(const char* ta, unsigned int num); void :ref:`net_drv_set_pci_param_uint`(const char* pci_oid, const char* param_name, tapi_cfg_pci_param_cmode cmode, uint64_t value, const char* vpref); void :ref:`net_drv_wait_up_gen`(const char* ta, const char* if_name, te_bool cleanup); static void :target:`net_drv_wait_up`(const char* ta, const char* if_name); // macros #define :ref:`NET_DRV_CLEANUP_SET_UP_WAIT`(_ta, _if_name) #define :ref:`NET_DRV_CONN_INIT` #define :ref:`NET_DRV_DEF_PTP_INACC` #define :ref:`NET_DRV_FLOW_INIT` #define :ref:`NET_DRV_PTP_OFFS_MAX_DEV_FROM_AVG` #define :target:`NET_DRV_PTP_OFFS_MAX_DEV_FROM_GETTIME` #define :ref:`NET_DRV_RESET_FLAGS` #define :ref:`NET_DRV_RSS_CHECK_SET_HFUNC`(_ta, _if_name, _rss_ctx, _func_name, _term_macro) #define :ref:`NET_DRV_RSS_CTX_INIT` #define :ref:`NET_DRV_RX_RULE_LOC` #define :ref:`NET_DRV_WAIT_IF_STATS_UPDATE` #define :target:`NET_DRV_X3_DRIVER_NAME` #define :ref:`NET_DRV_XDP_CFG_DEF` #define :ref:`NET_DRV_XDP_COPY_MODE` #define :ref:`NET_DRV_XDP_SOCK_INIT` #define :ref:`NET_DRV_XDP_WAIT_SOCKS` #define :target:`TEST_END_SPECIFIC` #define :target:`TEST_START_SPECIFIC` #define :target:`TEST_START_VARS` .. _details-global: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Typedefs -------- .. index:: pair: typedef; net_drv_rss_ctx .. _doxid-common__rss_8h_1a612e4e5f62480e6038395b322fff8041: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`net_drv_rss_ctx` net_drv_rss_ctx Helper structure for RSS tests .. index:: pair: typedef; net_drv_xdp_sock .. _doxid-common__rss_8h_1abd60a489d6b186b6bfb60a8e69df0123: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`net_drv_xdp_sock` net_drv_xdp_sock Structure describing AF_XDP socket .. index:: pair: typedef; net_drv_xdp_cfg .. _doxid-common__rss_8h_1a3dad00077c96bd5af4bd308cec8b45ad: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`net_drv_xdp_cfg` net_drv_xdp_cfg Configuration parameters for AF_XDP sockets .. index:: pair: typedef; net_drv_conn .. _doxid-net__drv__data__flow_8h_1a0ed8e7553516edb2a1b474eff3909b83: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`net_drv_conn` net_drv_conn A pair of connected sockets .. index:: pair: typedef; net_drv_flow .. _doxid-net__drv__data__flow_8h_1aa43dd36db4ffddf1568d7564f277e3d6: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`net_drv_flow` net_drv_flow Structure describing data flow between a pair of sockets Global Functions ---------------- .. index:: pair: function; net_drv_rss_send_check_stats .. _doxid-common__rss_8h_1ad433f3698acfcfb1ada78c0140b83ff3: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_rss_send_check_stats(rcf_rpc_server* sender_rpcs, int sender_s, const struct sockaddr* sender_addr, rcf_rpc_server* receiver_rpcs, int receiver_s, const struct sockaddr* receiver_addr, rpc_socket_type sock_type, unsigned int exp_queue, unsigned int bpf_id, const char* vpref) Send a few packets and check whether expected Rx queue received them. This function clears XDP hook statistics before sending. If both **sender_addr** and **receiver_addr** are ``NULL``, the function assumes that XDP hook is already configured. If at least one of these parameters is not ``NULL``, XDP hook is reconfigured to count only packets matching provided addresses and ports. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - sender_rpcs - Sender RPC server * - sender_s - Sender socket * - sender_addr - Sender address (may be ``NULL``) * - receiver_rpcs - Receiver RPC server * - receiver_s - Receiver socket * - receiver_addr - Receiver address (may be ``NULL``) * - sock_type - Socket type (``RPC_SOCK_STREAM``, ``RPC_SOCK_DGRAM``) * - exp_queue - Expected RSS queue ID * - bpf_id - Id of XDP hook used to count packets * - vpref - Prefix to use in verdicts .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_rss_send_get_stats .. _doxid-common__rss_8h_1a45dcb6477d60d6112dd9af756ea2e551: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_rss_send_get_stats(rcf_rpc_server* sender_rpcs, int sender_s, const struct sockaddr* sender_addr, rcf_rpc_server* receiver_rpcs, int receiver_s, const struct sockaddr* receiver_addr, rpc_socket_type sock_type, unsigned int bpf_id, tapi_bpf_rxq_stats** stats, unsigned int* stats_count, const char* vpref) Send a few packets, retrieve Rx queues statistics. This function clears XDP hook statistics before sending. If both **sender_addr** and **receiver_addr** are ``NULL``, the function assumes that XDP hook is already configured. If at least one of these parameters is not ``NULL``, XDP hook is reconfigured to count only packets matching provided addresses and ports. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - sender_rpcs - Sender RPC server * - sender_s - Sender socket * - sender_addr - Sender address (may be ``NULL``) * - receiver_rpcs - Receiver RPC server * - receiver_s - Receiver socket * - receiver_addr - Receiver address (may be ``NULL``) * - sock_type - Socket type (``RPC_SOCK_STREAM``, ``RPC_SOCK_DGRAM``) * - bpf_id - Id of XDP hook used to count packets * - stats - Array with retrieved statistics * - stats_count - Number of elements in the retrieved array * - vpref - Prefix to use in verdicts .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_rss_check_set_hfunc .. _doxid-common__rss_8h_1ab62cde4df912c8842711d7bf0582c0c4: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_rss_check_set_hfunc(const char* ta, const char* if_name, unsigned int rss_context, const char* func_name) Check whether expected RSS hash function is enabled; if not, try to change configuration. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Network interface name * - rss_context - RSS context * - func_name - Function name .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_rss_get_check_hkey .. _doxid-common__rss_8h_1a28b1e91241b91d0a6a73b4dec73d87ee: .. ref-code-block:: cpp :class: doxyrest-title-code-block static void net_drv_rss_get_check_hkey(const char* ta, const char* if_name, unsigned int rss_context, uint8_t** key, size_t* len) Get RSS hash key. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Network interface name * - rss_context - RSS context * - key - Where to save pointer to hash key (should be released by caller) * - len - Where to save key length .. index:: pair: function; net_drv_rss_ctx_prepare .. _doxid-common__rss_8h_1a474cb5e5239db58e5508f574b1bda066: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_rss_ctx_prepare(:ref:`net_drv_rss_ctx`* ctx, const char* ta, const char* if_name, unsigned int rss_ctx) Fill fields of RSS test context. This function can print verdict and jump to cleanup. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ctx - Context structure to initialize * - ta - Test agent name * - if_name - Interface name * - rss_ctx - RSS context id .. index:: pair: function; net_drv_rss_ctx_release .. _doxid-common__rss_8h_1a4e3196637fde7becf27165c54f40269d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_rss_ctx_release(:ref:`net_drv_rss_ctx`* ctx) Release resources allocated for RSS test context. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ctx - Pointer to context structure .. index:: pair: function; net_drv_rss_ctx_change_key .. _doxid-common__rss_8h_1a6aff14cbbe32509bfbfa6fce41505eeb: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_rss_ctx_change_key(:ref:`net_drv_rss_ctx`* ctx, uint8_t* hash_key, unsigned int key_len) Change hash key used for Toeplitz hash computation. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ctx - Pointer to context structure * - hash_key - New hash key * - key_len - Key length .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_rss_predict .. _doxid-common__rss_8h_1a6e774552465f97a294d082479578c9a0: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_rss_predict(:ref:`net_drv_rss_ctx`* ctx, const struct sockaddr* src_addr, const struct sockaddr* dst_addr, unsigned int* hash_out, unsigned int* idx_out, unsigned int* queue_out) Predict Toeplitz hash value, indirection table index and Rx queue id for given pairs of addresses/ports. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ctx - RSS test context * - src_addr - Source address/port * - dst_addr - Destination address/port * - hash_out - Where to save hash value (may be ``NULL``) * - idx_out - Where to save indirection table index (may be ``NULL``) * - queue_out - Where to save Rx queue id (may be ``NULL``) .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_rx_rules_check_table_size .. _doxid-common__rss_8h_1a5481884dd1d360ed8af03b35be79187d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_rx_rules_check_table_size(const char* ta, const char* if_name, uint32_t* table_size) Check that size of Rx rules table can be read and it is not zero. Stop the test if this check fails. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - table_size - Retrieved table size (may be ``NULL``) .. index:: pair: function; net_drv_rx_rules_check_spec_loc .. _doxid-common__rss_8h_1a19cd804a5c300a480a7fb67987d6d550: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_rx_rules_check_spec_loc(const char* ta, const char* if_name) Check that special insert locations are supported. Skip the test if it is not the case. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name .. index:: pair: function; net_drv_rx_rules_find_loc .. _doxid-common__rss_8h_1a1659f96c31734d3c12b9f17362aa6e99: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_rx_rules_find_loc(const char* ta, const char* if_name, int64_t* location) Find appropriate location for a new rule, prefering TAPI_CFG_RX_RULE_ANY if special insert locations are supported. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - location - Found location .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_add_tcpudp_rx_rule .. _doxid-common__rss_8h_1a35f9138e3b28cdc3c60beba6138fe8ea: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_add_tcpudp_rx_rule(const char* ta, const char* if_name, rpc_socket_type sock_type, const struct sockaddr* src_addr, const struct sockaddr* src_mask, const struct sockaddr* dst_addr, const struct sockaddr* dst_mask, unsigned int queue, const char* rule_name) Add a new TCP/UDP Rx classification rule at any available location. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - sock_type - Socket type (``RPC_SOCK_STREAM`` or ``RPC_SOCK_DGRAM``) * - src_addr - Source address (may be ``NULL``) * - src_mask - Source address mask (may be ``NULL``) * - dst_addr - Destination address (may be ``NULL``) * - dst_mask - Destination address mask (may be ``NULL``) * - queue - Rx queue to which to redirect packets * - rule_name - Rule name to print in verdicts (may be empty) .. index:: pair: function; net_drv_xdp_adjust_rx_size .. _doxid-common__rss_8h_1a42a9d644dbc592ffe4e557eaf20a6590: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_xdp_adjust_rx_size(const char* ta, const char* if_name, :ref:`net_drv_xdp_cfg`* cfg) Adjust number of Rx frames and size of Rx ring taking into account current size of Rx ring. Intel NICs drivers (X710, E810) do not work correctly unless we add enough buffers to FILL ring. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - if_name - Interface name. * - cfg - XDP configuration structure where to adjust fields. .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_xdp_create_sock .. _doxid-common__rss_8h_1ab5aeb44964ba8444a759641ca2db5c3e: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_xdp_create_sock(rcf_rpc_server* rpcs, const char* if_name, unsigned int queue_id, :ref:`net_drv_xdp_cfg`* cfg, int map_fd, :ref:`net_drv_xdp_sock`* sock) Create and configure AF_XDP socket. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server * - if_name - Interface name * - queue_id - Rx queue index * - cfg - Configuration parameters for UMEM and socket * - map_fd - XSK map file descriptor * - sock - Created socket data .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_xdp_destroy_sock .. _doxid-common__rss_8h_1ad18b87589497b6391291fc8209a07471: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_xdp_destroy_sock(rcf_rpc_server* rpcs, :ref:`net_drv_xdp_sock`* sock) Destroy AF_XDP socket created with :ref:`net_drv_xdp_create_sock() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server * - sock - Pointer to socket structure .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_xdp_create_socks .. _doxid-common__rss_8h_1a466aa209b736a800801e23ad66ed1e39: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_xdp_create_socks(rcf_rpc_server* rpcs, const char* if_name, :ref:`net_drv_xdp_cfg`* cfg, int map_fd, unsigned int socks_num, :ref:`net_drv_xdp_sock`** socks_out) Create array of AF_XDP sockets. For every socket use Rx queue of the same index and set entry of XSK map with the same index to its file descriptor. This function prints verdict and exits in case of failure. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server * - if_name - Interface name * - cfg - Configuration parameters for UMEM and socket * - map_fd - XSK map file descriptor * - socks_num - Number of sockets to create * - socks_out - Created sockets array .. index:: pair: function; net_drv_xdp_destroy_socks .. _doxid-common__rss_8h_1a35691aee277fb5c4f2d2daea4204b040: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_xdp_destroy_socks(rcf_rpc_server* rpcs, :ref:`net_drv_xdp_sock`* socks, unsigned int socks_num) Destroy array of AF_XDP sockets created with :ref:`net_drv_xdp_create_socks() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server * - socks - Array of sockets * - socks_num - Number of sockets .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_xdp_echo .. _doxid-common__rss_8h_1ac22766c865be119c10f93df435dce538: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_xdp_echo(rcf_rpc_server* rpcs_udp, int s_udp, const struct sockaddr* dst_addr, rcf_rpc_server* rpcs_xdp, :ref:`net_drv_xdp_sock`* socks, unsigned int socks_num, unsigned int exp_sock) Send a packet from a UDP socket. Check that the expected AF_XDP socket gets that packet on a peer. Construct a reply by inverting addresses and ports of the received packet. Send it back to the UDP socket over the same AF_XDP socket. Check that the UDP socket gets it and its payload is the same as in the previously sent packet. This function can print verdict and fail the test. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs_udp - RPC server with UDP socket * - s_udp - UDP socket * - dst_addr - Destination address and port * - rpcs_xdp - RPC server with AF_XDP sockets * - socks - Array of AF_XDP sockets * - socks_num - Number of sockets in the array * - exp_socket - Index of the AF_XDP socket which should receive the packet .. index:: pair: function; net_drv_conn_create .. _doxid-net__drv__data__flow_8h_1a92458776a5108f80a8e952e2e847bb59: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_conn_create(:ref:`net_drv_conn`* conn) Create a pair of connected sockets. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - conn - Where to get addresses/ports and etc, where to save created sockets. .. index:: pair: function; net_drv_conn_destroy .. _doxid-net__drv__data__flow_8h_1a0ae2ca804b21b670b01ffc84ba117aed: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_conn_destroy(:ref:`net_drv_conn`* conn) Destroy a pair of connected sockets. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - conn - Structure with sockets to close. .. index:: pair: function; net_drv_flow_prepare .. _doxid-net__drv__data__flow_8h_1a4b4d504e8bb9ae93bb35215e56e669c3: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_flow_prepare(:ref:`net_drv_flow`* flow) Make preparations before starting data flow (create RPC servers if necessary, initialize internal fields, etc). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - flow - Pointer to :ref:`net_drv_flow ` structure to prepare. .. index:: pair: function; net_drv_flow_start .. _doxid-net__drv__data__flow_8h_1a1a5a3633b0974394ca56d54e67ecca67: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_flow_start(:ref:`net_drv_flow`* flow) Start sending/receiving data. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - flow - Pointer to :ref:`net_drv_flow ` structure describing the flow. .. index:: pair: function; net_drv_flow_finish .. _doxid-net__drv__data__flow_8h_1a748055e5623a5395a4cd80f968a8322f: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_flow_finish(:ref:`net_drv_flow`* flow) Wait until sending/receiving data is finished, check results of RPC calls. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - flow - Pointer to :ref:`net_drv_flow ` structure describing the flow. .. index:: pair: function; net_drv_flow_destroy .. _doxid-net__drv__data__flow_8h_1a84a11c95a54919c61a1fa2c89e214954: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_flow_destroy(:ref:`net_drv_flow`* flow) Release resources allocated for sending and receiving data. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - flow - Pointer to :ref:`net_drv_flow ` structure describing the flow. .. index:: pair: function; net_drv_ethtool_reset .. _doxid-net__drv__ethtool_8h_1ad44abd1d2e791470823aad45270570fa: .. ref-code-block:: cpp :class: doxyrest-title-code-block int net_drv_ethtool_reset(rcf_rpc_server* rpcs, int s, const char* if_name, unsigned int flags, unsigned int* ret_flags) Call SIOCETHTOOL/ETHTOOL_RESET. This is simple wrapper over rpc_ioctl(); RPC_AWAIT_ERROR() can be used with it. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server * - s - Socket FD * - if_name - Interface name * - flags - Reset flags (see rpc_ethtool_reset_flags) * - ret_flags - If not ``NULL``, flags not cleared by ioctl() will be saved here .. rubric:: Returns: Result of rpc_ioctl(). .. index:: pair: function; net_drv_open_ptp_fd .. _doxid-net__drv__ptp_8h_1aac85947391a878133902529511b7378f: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_open_ptp_fd(rcf_rpc_server* rpcs, const char* if_name, int* fd, const char* vpref) Open PTP device associated with a given network interface. This function prints verdict and terminates test on failure. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server * - if_name - Interface name * - fd - Where to save opened file descriptor * - vpref - Prefix for verdicts (may be ``NULL`` or empty) .. index:: pair: function; net_drv_timespec_diff .. _doxid-net__drv__ptp_8h_1a30e7f5f8460ab01ccdeabbcb823f9e95: .. ref-code-block:: cpp :class: doxyrest-title-code-block double net_drv_timespec_diff(tarpc_timespec* tsa, tarpc_timespec* tsb) Get difference between two timespec structures in seconds (tsa - tsb). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - tsa - The first timestamp * - tsb - The second timestamp .. rubric:: Returns: Difference in seconds. .. index:: pair: function; net_drv_ptp_clock_time_diff .. _doxid-net__drv__ptp_8h_1aebef4d3e6f01962e7fad47b0605bea8a: .. ref-code-block:: cpp :class: doxyrest-title-code-block double net_drv_ptp_clock_time_diff(tarpc_ptp_clock_time* tsa, tarpc_ptp_clock_time* tsb) Get difference between two tarpc_ptp_clock_time structures in seconds (tsa - tsb). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - tsa - The first timestamp * - tsb - The second timestamp .. rubric:: Returns: Difference in seconds. .. index:: pair: function; net_drv_ptp_offs_check_dev_avg .. _doxid-net__drv__ptp_8h_1a222da107e926224ea530753d173560aa: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_ptp_offs_check_dev_avg(double* values, unsigned int number, double avg_diff) Check whether sample differences are close to the average when testing requests like PTP_SYS_OFFSET. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - values - Array of differences between clocks * - number - Number of elements in the array * - avg_diff - Average difference .. index:: pair: function; net_drv_ptp_offs_check_dev_gettime .. _doxid-net__drv__ptp_8h_1af782b38ac7d41259194021bd1bed577b: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_ptp_offs_check_dev_gettime(rcf_rpc_server* rpcs, int ptp_fd, rpc_clock_id sys_clock, double ptp_offs) Check whether estimated difference between PTP clock and system clock is close to the difference computed with two consecutive clock_gettime() calls. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server on which to call clock_gettime() * - ptp_fd - PTP device FD * - sys_clock - System clock to get system timestamp from * - ptp_offs - Estimated difference between PTP and system clock, in seconds .. index:: pair: function; rpc_net_drv_too_many_rx_rules .. _doxid-net__drv__rpc_8h_1a3c04a3273bbcb73514e9fa6d87cff27f: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_net_drv_too_many_rx_rules(rcf_rpc_server* rpcs, int fd, const char* if_name, const struct sockaddr* src_addr, const struct sockaddr* dst_addr, rpc_socket_type sock_type, te_bool any_location, unsigned int queues_num, unsigned int* rules_count, te_errno* add_errno) Create as many Rx classification rules as possible before it fails. Then remove all the created rules. To make rules different, this function iterates over all possible TCP/UDP ports for source and destination. So this function can create up to 4294836225 rules. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server. * - fd - File descriptor on which to call ioctl() when creating Rx rules. * - if_name - Interface name. * - src_addr - Source IP address. * - dst_addr - Destination IP address. * - sock_type - ``RPC_SOCK_STREAM`` or ``RPC_SOCK_DGRAM`` - defines whether created rule is for TCP or for UDP. * - any_location - If ``TRUE``, use special "any" location when adding a rule. Otherwise set specific location. * - queues_num - Number of available Rx queues. * - rules_count - How many rules were created. * - add_error - Which error was encountered when trying to add the last rule. .. rubric:: Returns: ``0`` on success, ``-1`` on failure. .. index:: pair: function; rpc_net_drv_send_pkts_exact_delay .. _doxid-net__drv__rpc_8h_1a27f140f428b1b5610dc69d293fb94356: .. ref-code-block:: cpp :class: doxyrest-title-code-block int64_t rpc_net_drv_send_pkts_exact_delay(rcf_rpc_server* rpcs, int s, unsigned int delay, unsigned int time2run) Send packets trying to keep requested time intervals between them. This is intended to be used with datagram sockets. Every packet has payload of 9 bytes, the first 8 bytes is 64-bit packet ordinal number in network byte order (to make it possible to detect lost packets). The last byte is 0xff, it makes it easy to skip small Ethernet frame padding at the end if it is retrieved by CSAP. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server. * - s - Socket FD. * - delay - Delay between packets, in microseconds. * - time2run - How long to send packets, in milliseconds. .. rubric:: Returns: Number of sent packets on success, ``-1`` on failure. .. index:: pair: function; rpc_net_drv_recv_pkts_exact_delay .. _doxid-net__drv__rpc_8h_1a2e6eb31cfb955f9cd1a35bda41df8282: .. ref-code-block:: cpp :class: doxyrest-title-code-block int64_t rpc_net_drv_recv_pkts_exact_delay(rcf_rpc_server* rpcs, int s, unsigned int time2wait) Receive and check packets sent with :ref:`rpc_net_drv_send_pkts_exact_delay() `. This function allows for packet losses. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server. * - s - Socket FD. * - time2wait - How long to wait for new data, in milliseconds. If no new data comes during this time, the RPC call terminates. .. rubric:: Returns: Number of received packets on success, ``-1`` on failure. .. index:: pair: function; net_drv_driver_name .. _doxid-net__drv__ts_8h_1a7f4041590b9b631c636f35a8078c87ec: .. ref-code-block:: cpp :class: doxyrest-title-code-block char* net_drv_driver_name(const char* ta) Get tested driver name on TA. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. .. rubric:: Returns: Pointer to dynamically allocated string, it should be released by caller. On failure ``NULL`` is returned. .. index:: pair: function; net_drv_driver_unloadable .. _doxid-net__drv__ts_8h_1aa4ee47d722030cb92b64373c845b6acd: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_bool net_drv_driver_unloadable(const char* ta, const char* module) Is driver unloadable? .. rubric:: Returns: ``TRUE`` or ``FALSE``. .. index:: pair: function; net_drv_driver_set_loaded .. _doxid-net__drv__ts_8h_1acb9830a7632583ca7f17f102b2e46212: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_driver_set_loaded(const char* ta, const char* module, te_bool load) Load or unload driver module, check that it succeeded. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - module - Kernel module name. * - load - If ``TRUE``, load the module, otherwise unload it. .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_req_if_feature_change .. _doxid-net__drv__ts_8h_1a37f1228d44399e8e9e74477d62bd656a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_req_if_feature_change(const char* ta, const char* if_name, const char* feature_name) Check whether a given interface feature (/interface:/feature: node) is present and can be modified for a given network interface. If it is not true, skip the test with TEST_SKIP(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - feature_name - Feature name .. index:: pair: function; net_drv_set_if_feature .. _doxid-net__drv__ts_8h_1a66525493386e1c01c69c686748134473: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_set_if_feature(const char* ta, const char* if_name, const char* feature_name, int req_status) Ensure that a given interface feature (/interface:/feature: node) has the requested status, change it if necessary. Absence of the feature is considered to be the same as it being disabled. If the requested feature status cannot be achieved, skip the test with TEST_SKIP(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - feature_name - Feature name * - req_status - Requested status: ``0`` (disabled) or ``1`` (enabled) .. index:: pair: function; net_drv_try_set_if_feature .. _doxid-net__drv__ts_8h_1a4af444d4a78018943c8ea87e4f641f66: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_try_set_if_feature(const char* ta, const char* if_name, const char* feature_name, int req_status) Try to set a given interface feature (/interface:/feature: node). If the feature is not present or is read-only and has a wrong status, print warning but do not fail the test. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - feature_name - Feature name * - req_status - Requested status: ``0`` (disabled) or ``1`` (enabled) .. index:: pair: function; net_drv_send_recv_check .. _doxid-net__drv__ts_8h_1ac1ea43f064115ac9cede357b2ff6fbd7: .. ref-code-block:: cpp :class: doxyrest-title-code-block size_t net_drv_send_recv_check(rcf_rpc_server* rpcs_sender, int s_sender, rcf_rpc_server* rpcs_receiver, int s_receiver, const char* vpref) Send some data, receive it on peer, check it. In case of any failure, print verdict and stop the test. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs_sender - RPC server from which to send. * - s_sender - Socket from which to send. * - rpcs_receiver - RPC server on which to receive. * - s_receiver - Socket on which to receive. * - vpref - Prefix for verdicts. .. rubric:: Returns: Number of bytes sent and received. .. index:: pair: function; net_drv_sendto_recv_check .. _doxid-net__drv__ts_8h_1aa6663379b14a54bf49d77178a4174907: .. ref-code-block:: cpp :class: doxyrest-title-code-block size_t net_drv_sendto_recv_check(rcf_rpc_server* rpcs_sender, int s_sender, const struct sockaddr* dst_addr, rcf_rpc_server* rpcs_receiver, int s_receiver, const char* vpref) Same as :ref:`net_drv_send_recv_check() ` but allows to specify destination address. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs_sender - RPC server from which to send. * - s_sender - Socket from which to send. * - dst_addr - If not ``NULL``, **sendto()** should be called with this destination. * - rpcs_receiver - RPC server on which to receive. * - s_receiver - Socket on which to receive. * - vpref - Prefix for verdicts. .. rubric:: Returns: Number of bytes sent and received. .. index:: pair: function; net_drv_sendto_recv_check_may_loss .. _doxid-net__drv__ts_8h_1a5521c4a4cee95ee4967238fc2457c37d: .. ref-code-block:: cpp :class: doxyrest-title-code-block size_t net_drv_sendto_recv_check_may_loss(rcf_rpc_server* rpcs_sender, int s_sender, const struct sockaddr* dst_addr, rcf_rpc_server* rpcs_receiver, int s_receiver, const char* vpref) Same as :ref:`net_drv_sendto_recv_check() ` but do not fail if receiver does not become readable and return 0. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs_sender - RPC server from which to send. * - s_sender - Socket from which to send. * - dst_addr - If not ``NULL``, **sendto()** should be called with this destination. * - rpcs_receiver - RPC server on which to receive. * - s_receiver - Socket on which to receive. * - vpref - Prefix for verdicts. .. rubric:: Returns: Number of bytes sent and received. .. index:: pair: function; net_drv_conn_check .. _doxid-net__drv__ts_8h_1ac263188a792a835d4603aa36eb726f70: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_conn_check(rcf_rpc_server* rpcs1, int s1, const char* s1_name, rcf_rpc_server* rpcs2, int s2, const char* s2_name, const char* vpref) Send data in both directions between a pair of connected sockets, check that it can be received. In case of any failure, print verdict and stop the test. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs1 - The first RPC server. * - s1 - The first socket. * - s1_name - Name of the first socket to be used in verdicts. * - rpcs2 - The second RPC server. * - s2 - The second socket. * - s2_name - Name of the second socket to be used in verdicts. * - vpref - Common prefix for verdicts. .. index:: pair: function; net_drv_cat_all_files .. _doxid-net__drv__ts_8h_1acc5dd18c7a0223753777a848f3797fcc: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_cat_all_files(rcf_rpc_server* rpcs, uint32_t timeout, const char* path_fmt, ...) Find all the readable files under a specified path and log their contents. The function will report failure if there is no matching files at all. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - rpcs - RPC server. * - timeout - Timeout for logging all files call, if it is ``0`` then use default * - path_fmt... - Path format string and arguments. .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_set_check_mac .. _doxid-net__drv__ts_8h_1a337d99e3bed17b1996b0e1ec27fb5f6c: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_set_check_mac(const char* ta, const char* if_name, const void* mac_addr) Set a new MAC address on a network interface, check that the new address is reported for the interface in configuration tree after that. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - if_name - Interface name. * - mac_addr - Address to set (assumed to have ``ETHER_ADDR_LEN`` bytes). .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_set_mtu .. _doxid-net__drv__ts_8h_1a46b40971f27ca36d105d0f840eace01b: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_set_mtu(const char* ta, const char* if_name, int mtu, const char* where) Try to set MTU, print verdict if it fails. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent * - if_name - Interface name * - mtu - MTU value to set * - where - Where MTU is set (to print in verdict) .. index:: pair: function; net_drv_neigh_nodes_count .. _doxid-net__drv__ts_8h_1a5646107e74accaea3b049fc37f171158: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_neigh_nodes_count(const char* ta, unsigned int* num) Get number of /agent:/sys:/net:/ipv[46]:/neigh: nodes currently present in configuration tree. This function is intended to be used with :ref:`net_drv_wait_neigh_nodes_recover() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - num - Where to save number of neigh nodes .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_wait_neigh_nodes_recover .. _doxid-net__drv__ts_8h_1a4d23a81d1b104108e943b72f2948ebe0: .. ref-code-block:: cpp :class: doxyrest-title-code-block te_errno net_drv_wait_neigh_nodes_recover(const char* ta, unsigned int num) Wait until the number of neigh nodes in configuration tree is not less than a given number. This function can be used to check that interfaces are fully recovered after the driver is reloaded. For some reason sometimes it takes more time for all neigh nodes to reappear, and restoring configuration from backup fails in such case. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - num - Number of neigh nodes which should be present .. rubric:: Returns: Status code. .. index:: pair: function; net_drv_set_pci_param_uint .. _doxid-net__drv__ts_8h_1a7a365d976ec9939c50e977a44e6baedd: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_set_pci_param_uint(const char* pci_oid, const char* param_name, tapi_cfg_pci_param_cmode cmode, uint64_t value, const char* vpref) Set PCI device parameter to a given value and check that its value is expected after that. In case of failure this function prints verdict and jumps to cleanup. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - pci_oid - PCI device OID * - param_name - Parameter name * - cmode - Configuration mode in which value should be set * - value - Value to set * - vpref - Prefix to print in verdicts in case of failure .. index:: pair: function; net_drv_wait_up_gen .. _doxid-net__drv__ts_8h_1af59bd374fdb09dd199976afb5b582176: .. ref-code-block:: cpp :class: doxyrest-title-code-block void net_drv_wait_up_gen(const char* ta, const char* if_name, te_bool cleanup) Wait until link status for the IUT interface is reported to be UP in configuration tree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name @oaram cleanup Whether to use verdict suitable for test section or for cleanup section Macros ------ .. index:: pair: define; NET_DRV_CLEANUP_SET_UP_WAIT .. _doxid-net__drv__ts_8h_1a6f9ed2272737a4f36660d4c6ba812325: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_CLEANUP_SET_UP_WAIT(_ta, _if_name) Cleanup macro for bringing up interface and waiting until link status for the IUT interface is reported to be UP in configuration tree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name .. index:: pair: define; NET_DRV_CONN_INIT .. _doxid-net__drv__data__flow_8h_1a81f7fdf5de754b55c570edaf53c8ec18: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_CONN_INIT Initializer for :ref:`net_drv_conn ` structure .. index:: pair: define; NET_DRV_DEF_PTP_INACC .. _doxid-net__drv__ptp_8h_1a79f294cf08d1cece84e696e1aa3771cc: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_DEF_PTP_INACC Maximum inaccuracy in seconds when checking what clock_gettime() returns. It is assumed that this inaccuracy is largely due to TE delays (time required to call RPCs, etc). .. index:: pair: define; NET_DRV_FLOW_INIT .. _doxid-net__drv__data__flow_8h_1abcfa1c317b7b736f0f2d0f02e8e94deb: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_FLOW_INIT Initializer for :ref:`net_drv_flow ` structure .. index:: pair: define; NET_DRV_PTP_OFFS_MAX_DEV_FROM_AVG .. _doxid-net__drv__ptp_8h_1aff22dc005eedbf0ac4c323520ff35579: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_PTP_OFFS_MAX_DEV_FROM_AVG Maximum deviation from average time difference between PTP and system clocks when checking requests like PTP_SYS_OFFSET, in seconds. .. index:: pair: define; NET_DRV_RESET_FLAGS .. _doxid-net__drv__ethtool_8h_1a85bb7d2541a1c216080381c7016298e7: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_RESET_FLAGS List of ETHTOOL_RESET flags for TEST_GET_ENUM_PARAM() .. index:: pair: define; NET_DRV_RSS_CHECK_SET_HFUNC .. _doxid-common__rss_8h_1a6d8c2a43093d3ed587fe67ca19641413: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_RSS_CHECK_SET_HFUNC(_ta, _if_name, _rss_ctx, _func_name, _term_macro) Make sure that specific RSS hash function is used. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - _ta - Test Agent name * - _if_name - Interface name * - _rss_ctx - RSS context * - _func_name - Function name * - _term_macro - Macro used to terminate the test if requested function is not known or not supported (TEST_SUCCESS, TEST_STOP, etc) .. index:: pair: define; NET_DRV_RSS_CTX_INIT .. _doxid-common__rss_8h_1a7b92b7da1f730e55660928504d2d3431: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_RSS_CTX_INIT Initializer for :ref:`net_drv_rss_ctx ` .. index:: pair: define; NET_DRV_RX_RULE_LOC .. _doxid-common__rss_8h_1adc2283442f932b28b65da69a1d2d9188: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_RX_RULE_LOC List of values for rule location test parameter, to be used together with TEST_GET_ENUM_PARAM(). .. index:: pair: define; NET_DRV_WAIT_IF_STATS_UPDATE .. _doxid-net__drv__ts_8h_1a393ea4ed6456e18db1c682aa91e0d273: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_WAIT_IF_STATS_UPDATE Wait until interface statistics are updated after sending or receiving something. Increase sleep time from 1 to 2 according to X3-1135. .. index:: pair: define; NET_DRV_XDP_CFG_DEF .. _doxid-common__rss_8h_1affaa024b94a7ce0c12dd88b507afad69: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_XDP_CFG_DEF Default configuration for AF_XDP sockets .. index:: pair: define; NET_DRV_XDP_COPY_MODE .. _doxid-common__rss_8h_1a9343fb58fa9ecaf37d4d9c237ceaf510: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_XDP_COPY_MODE List of possible XDP copy mode flags for TEST_GET_ENUM_PARAM() .. index:: pair: define; NET_DRV_XDP_SOCK_INIT .. _doxid-common__rss_8h_1a6c339161e519542e4ee862bcd1d07f7c: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_XDP_SOCK_INIT Initializer for :ref:`net_drv_xdp_sock ` .. index:: pair: define; NET_DRV_XDP_WAIT_SOCKS .. _doxid-common__rss_8h_1a889a9dc6bef8d51fe24b33b58ddb1ed6: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define NET_DRV_XDP_WAIT_SOCKS Wait until AF_XDP sockets are fully configured