* [PATCH] scsi: cxgb4i: assign rxqs in round robin mode
@ 2017-06-22 10:17 Varun Prakash
2017-06-26 17:29 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Varun Prakash @ 2017-06-22 10:17 UTC (permalink / raw)
To: martin.petersen; +Cc: linux-scsi, indranil, varun
Assign rxq to TCP connections in round robin mode
to use all available rxqs.
Signed-off-by: Varun Prakash <varun@chelsio.com>
---
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 5 ++++-
drivers/scsi/cxgbi/libcxgbi.h | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 0aae094..fa99471 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1606,6 +1606,7 @@ static int init_act_open(struct cxgbi_sock *csk)
struct neighbour *n = NULL;
void *daddr;
unsigned int step;
+ unsigned int rxq_idx;
unsigned int size, size6;
unsigned int linkspeed;
unsigned int rcv_winf, snd_winf;
@@ -1684,7 +1685,9 @@ static int init_act_open(struct cxgbi_sock *csk)
step = lldi->ntxq / lldi->nchan;
csk->txq_idx = cxgb4_port_idx(ndev) * step;
step = lldi->nrxq / lldi->nchan;
- csk->rss_qid = lldi->rxq_ids[cxgb4_port_idx(ndev) * step];
+ rxq_idx = (cxgb4_port_idx(ndev) * step) + (cdev->rxq_idx_cntr % step);
+ cdev->rxq_idx_cntr++;
+ csk->rss_qid = lldi->rxq_ids[rxq_idx];
linkspeed = ((struct port_info *)netdev_priv(ndev))->link_cfg.speed;
csk->snd_win = cxgb4i_snd_win;
csk->rcv_win = cxgb4i_rcv_win;
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index 37f07aa..31a5816 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -477,6 +477,7 @@ struct cxgbi_device {
unsigned int skb_rx_extra; /* for msg coalesced mode */
unsigned int tx_max_size;
unsigned int rx_max_size;
+ unsigned int rxq_idx_cntr;
struct cxgbi_ports_map pmap;
void (*dev_ddp_cleanup)(struct cxgbi_device *);
--
2.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: cxgb4i: assign rxqs in round robin mode
2017-06-22 10:17 [PATCH] scsi: cxgb4i: assign rxqs in round robin mode Varun Prakash
@ 2017-06-26 17:29 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-06-26 17:29 UTC (permalink / raw)
To: Varun Prakash; +Cc: martin.petersen, linux-scsi, indranil
Varun,
> Assign rxq to TCP connections in round robin mode to use all available
> rxqs.
Applied to 4.13/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-26 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 10:17 [PATCH] scsi: cxgb4i: assign rxqs in round robin mode Varun Prakash
2017-06-26 17:29 ` Martin K. Petersen
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).