Hi Manuel,

Regarding qp_id + outbound, each resource "contains" 2 queue_pairs for inbound 
and outbound traffic respectively.
That being said, I don't see any reason why it could not be reworked to have 1 
qp per resource.

So regarding your first point, I reckon it is a bug given that the current code 
assumes a minimum of 2 qps.

The quick fix would be to add a check for at least 2 qps per device, otherwise 
you could rework the code to just have a qp per resource so that each worker 
only uses one qp of each device. Might need to tweak the crypto device queue 
size for performance on some setups.

HTH,
Sergio
________________________________
From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> on behalf of 
manuel.alo...@cavium.com <manuel.alo...@cavium.com>
Sent: Friday, January 25, 2019 3:51 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Question about crypto dev queue pairs #vpp

Hello all,

Just tracing a bit the code I noticed that there is a concept of "queue pair" 
and every crypto device allocates its own number of queue pairs.
Two questions (version 19.01):
1. Regarding the max_res_idx (ipsec.c) calculation:
max_res_idx = (dev->max_qp / 2) - 1;   (if dev->max_qp == 1 then max_res_idx = 
65535)
Notice that if max_qp is 1 then the loop below never ends (since j is always <= 
65535)
u16 j;
 for (j = 0; j <= max_res_idx; j++, res_idx++) {
}

Another issue that I am trying to understand is the snippet below (ipsec.h):
   enq = rte_cryptodev_enqueue_burst (res->dev_id, res->qp_id + outbound,
res->ops, res->n_ops);

outbound == 1 in the enqueue case and crypto resources under that function call 
 have only  "res->gp_id" queue pairs ids, not sure how can it work(unless there 
is a contiguous allocation from another device)

I'd welcome any help on understanding both points.

BR,
Manuel
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12024): https://lists.fd.io/g/vpp-dev/message/12024
Mute This Topic: https://lists.fd.io/mt/29538345/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to