DPDK HQoS: enable vpp control plane thread connection to hqos thread
The vpp control plane thread generates different types of packets such as ARP, DHCP client, IPv6 RA, etc. which need to go through HQoS thread associated with the output interfaces. Therefore, this patch enables vpp main thread connection with the HQoS thread through dedicated SWQ. Change-Id: Idcb759546d4bcd9b40beedaec4f12b29baae3e40 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
This commit is contained in:

committed by
Damjan Marion

parent
e4504c6320
commit
199ca9c449
@ -262,6 +262,8 @@ static_always_inline
|
||||
dpdk_device_hqos_per_worker_thread_t *hqos =
|
||||
&xd->hqos_wt[vm->cpu_index];
|
||||
|
||||
ASSERT (hqos->swq != NULL);
|
||||
|
||||
dpdk_hqos_metadata_set (hqos,
|
||||
&tx_vector[tx_tail], tx_head - tx_tail);
|
||||
rv = rte_ring_sp_enqueue_burst (hqos->swq,
|
||||
|
@ -277,10 +277,10 @@ dpdk_port_setup_hqos (dpdk_device_t * xd, dpdk_device_config_hqos_t * hqos)
|
||||
memset (xd->hqos_ht, 0, sizeof (xd->hqos_ht[0]));
|
||||
|
||||
/* Allocate space for one SWQ per worker thread in the I/O TX thread data structure */
|
||||
vec_validate (xd->hqos_ht->swq, worker_thread_count - 1);
|
||||
vec_validate (xd->hqos_ht->swq, worker_thread_count);
|
||||
|
||||
/* SWQ */
|
||||
for (i = 0; i < worker_thread_count; i++)
|
||||
for (i = 0; i < worker_thread_count + 1; i++)
|
||||
{
|
||||
u32 swq_flags = RING_F_SP_ENQ | RING_F_SC_DEQ;
|
||||
|
||||
@ -354,9 +354,13 @@ dpdk_port_setup_hqos (dpdk_device_t * xd, dpdk_device_config_hqos_t * hqos)
|
||||
xd->hqos_ht->flush_count = 0;
|
||||
|
||||
/* Set up per-thread device data for each worker thread */
|
||||
for (i = 0; i < worker_thread_count; i++)
|
||||
for (i = 0; i < worker_thread_count + 1; i++)
|
||||
{
|
||||
u32 tid = worker_thread_first + i;
|
||||
u32 tid;
|
||||
if (i)
|
||||
tid = worker_thread_first + (i - 1);
|
||||
else
|
||||
tid = i;
|
||||
|
||||
xd->hqos_wt[tid].swq = xd->hqos_ht->swq[i];
|
||||
xd->hqos_wt[tid].hqos_field0_slabpos = hqos->pktfield0_slabpos;
|
||||
|
Reference in New Issue
Block a user