DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Question about worker assignment in load balancer implementaion in DPDK library example.
@ 2015-05-27 14:04 최익성
  0 siblings, 0 replies; only message in thread
From: 최익성 @ 2015-05-27 14:04 UTC (permalink / raw)
  To: dev

Dear DPDK experts.
 
I have a question about load balancer implementaion in DPDK library example.
(dpdk-2.0.0/examples/load_balancer)
 
I read from load balancer application user guide that The worker lcore to handle the current packet is determined by reading a predefined 1 byte field from the input packet.
 
worker_id = packet[load_balancing_field(pos_lb)] % n_workers .
 
However I found its implementaion of the above function in the source code.
 
worker_0 = data_0_0[pos_lb] & (n_workers - 1);
worker_1 = data_0_1[pos_lb] & (n_workers - 1);
 
Does this implementation works?
 
If the n_workers = 3, the worker_0 and worker_1 have only values of 0 or 2.
 
I will appreciate if I can be given any advice or information.
 
Thank you very much.
 
Sincerely Yours,
 
Ick-Sung Choi.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-27 14:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 14:04 [dpdk-dev] Question about worker assignment in load balancer implementaion in DPDK library example 최익성

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).