| rte_distributor_single.h(3) | Library Functions Manual | rte_distributor_single.h(3) |
rte_distributor_single.h
#define RTE_DISTRIBUTOR_NAMESIZE 32
struct rte_distributor_single *
rte_distributor_create_single (const char *name, unsigned int
socket_id, unsigned int num_workers)
int rte_distributor_process_single (struct rte_distributor_single *d,
struct rte_mbuf **mbufs, unsigned int num_mbufs)
int rte_distributor_returned_pkts_single (struct rte_distributor_single
*d, struct rte_mbuf **mbufs, unsigned int max_mbufs)
int rte_distributor_flush_single (struct rte_distributor_single *d)
void rte_distributor_clear_returns_single (struct
rte_distributor_single *d)
struct rte_mbuf * rte_distributor_get_pkt_single (struct
rte_distributor_single *d, unsigned int worker_id, struct rte_mbuf
*oldpkt)
int rte_distributor_return_pkt_single (struct rte_distributor_single
*d, unsigned int worker_id, struct rte_mbuf *mbuf)
void rte_distributor_request_pkt_single (struct rte_distributor_single
*d, unsigned int worker_id, struct rte_mbuf *oldpkt)
struct rte_mbuf * rte_distributor_poll_pkt_single (struct
rte_distributor_single *d, unsigned int worker_id)
RTE distributor
The distributor is a component which is designed to pass packets one-at-a-time to workers, with dynamic load balancing.
Definition in file rte_distributor_single.h.
Length of name for instance
Definition at line 20 of file rte_distributor_single.h.
Function to create a new distributor instance
Reserves the memory needed for the distributor operation and initializes the distributor to work with the configured number of workers.
Parameters
Returns
Process a set of packets by distributing them among workers that request packets. The distributor will ensure that no two packets that have the same flow id, or tag, in the mbuf will be processed at the same time.
The user is advocated to set tag for each mbuf before calling this function. If user doesn't set the tag, the tag value can be various values depending on driver implementation and configuration.
This is not multi-thread safe and should only be called on a single lcore.
Parameters
Returns
Get a set of mbufs that have been returned to the distributor by workers
This should only be called on the same lcore as rte_distributor_process()
Parameters
Returns
Flush the distributor component, so that there are no in-flight or backlogged packets awaiting processing
This should only be called on the same lcore as rte_distributor_process()
Parameters
Returns
Clears the array of returned packets used as the source for the rte_distributor_returned_pkts() API call.
This should only be called on the same lcore as rte_distributor_process()
Parameters
API called by a worker to get a new packet to process. Any previous packet given to the worker is assumed to have completed processing, and may be optionally returned to the distributor via the oldpkt parameter.
Parameters
Returns
API called by a worker to return a completed packet without requesting a new packet, for example, because a worker thread is shutting down
Parameters
API called by a worker to request a new packet to process. Any previous packet given to the worker is assumed to have completed processing, and may be optionally returned to the distributor via the oldpkt parameter. Unlike rte_distributor_get_pkt(), this function does not wait for a new packet to be provided by the distributor.
NOTE: after calling this function, rte_distributor_poll_pkt() should be used to poll for the packet requested. The rte_distributor_get_pkt() API should not be used to try and retrieve the new packet.
Parameters
API called by a worker to check for a new packet that was previously requested by a call to rte_distributor_request_pkt(). It does not wait for the new packet to be available, but returns NULL if the request has not yet been fulfilled by the distributor.
Parameters
Returns
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |