pktgen: Fix multiqueue handling
It is not currently possible to instruct pktgen to use one selected tx queue.
When Robert added multiqueue support in commit 45b270f8
, he added
an interval (queue_map_min, queue_map_max), and his code doesnt take
into account the case of min = max, to select one tx queue exactly.
I suspect a high performance setup on a eight txqueue device wants
to use exactly eight cpus, and assign one tx queue to each sender.
This patchs makes pktgen select the right tx queue, not the first one.
Also updates Documentation to reflect Robert changes.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -2212,7 +2212,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
|
||||
if (pkt_dev->flags & F_QUEUE_MAP_CPU)
|
||||
pkt_dev->cur_queue_map = smp_processor_id();
|
||||
|
||||
else if (pkt_dev->queue_map_min < pkt_dev->queue_map_max) {
|
||||
else if (pkt_dev->queue_map_min <= pkt_dev->queue_map_max) {
|
||||
__u16 t;
|
||||
if (pkt_dev->flags & F_QUEUE_MAP_RND) {
|
||||
t = random32() %
|
||||
|
新增問題並參考
封鎖使用者