Commit a74e44a1 authored by Vinay Kumar Yadav's avatar Vinay Kumar Yadav Committed by Jakub Kicinski

chelsio/chtls: Utilizing multiple rxq/txq to process requests

patch adds a logic to utilize multiple queues to process requests.
The queue selection logic uses a round-robin distribution technique
using a counter.
Signed-off-by: default avatarAyush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: default avatarVinay Kumar Yadav <vinay.yadav@chelsio.com>
Link: https://lore.kernel.org/r/20201102162832.22344-1-vinay.yadav@chelsio.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 873b807c
...@@ -235,6 +235,7 @@ struct chtls_dev { ...@@ -235,6 +235,7 @@ struct chtls_dev {
struct list_head na_node; struct list_head na_node;
unsigned int send_page_order; unsigned int send_page_order;
int max_host_sndbuf; int max_host_sndbuf;
u32 round_robin_cnt;
struct key_map kmap; struct key_map kmap;
unsigned int cdev_state; unsigned int cdev_state;
}; };
......
...@@ -1217,8 +1217,9 @@ static struct sock *chtls_recv_sock(struct sock *lsk, ...@@ -1217,8 +1217,9 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
csk->sndbuf = csk->snd_win; csk->sndbuf = csk->snd_win;
csk->ulp_mode = ULP_MODE_TLS; csk->ulp_mode = ULP_MODE_TLS;
step = cdev->lldi->nrxq / cdev->lldi->nchan; step = cdev->lldi->nrxq / cdev->lldi->nchan;
csk->rss_qid = cdev->lldi->rxq_ids[port_id * step];
rxq_idx = port_id * step; rxq_idx = port_id * step;
rxq_idx += cdev->round_robin_cnt++ % step;
csk->rss_qid = cdev->lldi->rxq_ids[rxq_idx];
csk->txq_idx = (rxq_idx < cdev->lldi->ntxq) ? rxq_idx : csk->txq_idx = (rxq_idx < cdev->lldi->ntxq) ? rxq_idx :
port_id * step; port_id * step;
csk->sndbuf = newsk->sk_sndbuf; csk->sndbuf = newsk->sk_sndbuf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment