Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9008ee9 authored by Padmanabh Ratnakar's avatar Padmanabh Ratnakar Committed by David S. Miller
Browse files

be2net: Fix non utilization of RX queues



When non power of two MSIX vectors are given to driver, some RX queues
are not utilized. Program RSS table in such a way that all queues
are utilized.

Signed-off-by: default avatarPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 65f8584e
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -2312,8 +2312,8 @@ static int be_close(struct net_device *netdev)
static int be_rx_queues_setup(struct be_adapter *adapter)
static int be_rx_queues_setup(struct be_adapter *adapter)
{
{
	struct be_rx_obj *rxo;
	struct be_rx_obj *rxo;
	int rc, i;
	int rc, i, j;
	u8 rsstable[MAX_RSS_QS];
	u8 rsstable[128];


	for_all_rx_queues(adapter, rxo, i) {
	for_all_rx_queues(adapter, rxo, i) {
		rc = be_cmd_rxq_create(adapter, &rxo->q, rxo->cq.id,
		rc = be_cmd_rxq_create(adapter, &rxo->q, rxo->cq.id,
@@ -2325,11 +2325,15 @@ static int be_rx_queues_setup(struct be_adapter *adapter)
	}
	}


	if (be_multi_rxq(adapter)) {
	if (be_multi_rxq(adapter)) {
		for_all_rss_queues(adapter, rxo, i)
		for (j = 0; j < 128; j += adapter->num_rx_qs - 1) {
			rsstable[i] = rxo->rss_id;
			for_all_rss_queues(adapter, rxo, i) {
				if ((j + i) >= 128)
					break;
				rsstable[j + i] = rxo->rss_id;
			}
		}
		rc = be_cmd_rss_config(adapter, rsstable, 128);


		rc = be_cmd_rss_config(adapter, rsstable,
			adapter->num_rx_qs - 1);
		if (rc)
		if (rc)
			return rc;
			return rc;
	}
	}