net/cxgbe: fix rxq default params for ports under same PF
Enabling rx queues with default interrupt parameters doesn't happen
for other ports under same PF due to FULL_INIT_DONE flag being set
by the first port.
Fix is to to allow each port to enable its own rx queues with default
parameters.
Fixes: 0462d11544
("cxgbe: add device related operations")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
This commit is contained in:
parent
6c2809628c
commit
d87ba24d1a
@ -1,7 +1,7 @@
|
||||
/*-
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright(c) 2014-2015 Chelsio Communications.
|
||||
* Copyright(c) 2014-2017 Chelsio Communications.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -59,5 +59,6 @@ int setup_sge_fwevtq(struct adapter *adapter);
|
||||
void cfg_queues(struct rte_eth_dev *eth_dev);
|
||||
int cfg_queue_count(struct rte_eth_dev *eth_dev);
|
||||
int setup_rss(struct port_info *pi);
|
||||
void cxgbe_enable_rx_queues(struct port_info *pi);
|
||||
|
||||
#endif /* _CXGBE_H_ */
|
||||
|
@ -339,6 +339,8 @@ static int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
cxgbe_enable_rx_queues(pi);
|
||||
|
||||
err = setup_rss(pi);
|
||||
if (err)
|
||||
goto out;
|
||||
|
@ -984,33 +984,22 @@ int setup_rss(struct port_info *pi)
|
||||
/*
|
||||
* Enable NAPI scheduling and interrupt generation for all Rx queues.
|
||||
*/
|
||||
static void enable_rx(struct adapter *adap)
|
||||
static void enable_rx(struct adapter *adap, struct sge_rspq *q)
|
||||
{
|
||||
struct sge *s = &adap->sge;
|
||||
struct sge_rspq *q = &s->fw_evtq;
|
||||
int i, j;
|
||||
|
||||
/* 0-increment GTS to start the timer and enable interrupts */
|
||||
t4_write_reg(adap, MYPF_REG(A_SGE_PF_GTS),
|
||||
V_SEINTARM(q->intr_params) |
|
||||
V_INGRESSQID(q->cntxt_id));
|
||||
}
|
||||
|
||||
for_each_port(adap, i) {
|
||||
const struct port_info *pi = &adap->port[i];
|
||||
struct rte_eth_dev *eth_dev = pi->eth_dev;
|
||||
void cxgbe_enable_rx_queues(struct port_info *pi)
|
||||
{
|
||||
struct adapter *adap = pi->adapter;
|
||||
struct sge *s = &adap->sge;
|
||||
unsigned int i;
|
||||
|
||||
for (j = 0; j < eth_dev->data->nb_rx_queues; j++) {
|
||||
q = eth_dev->data->rx_queues[j];
|
||||
|
||||
/*
|
||||
* 0-increment GTS to start the timer and enable
|
||||
* interrupts
|
||||
*/
|
||||
t4_write_reg(adap, MYPF_REG(A_SGE_PF_GTS),
|
||||
V_SEINTARM(q->intr_params) |
|
||||
V_INGRESSQID(q->cntxt_id));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < pi->n_rx_qsets; i++)
|
||||
enable_rx(adap, &s->ethrxq[pi->first_qset + i].rspq);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1023,7 +1012,7 @@ static void enable_rx(struct adapter *adap)
|
||||
*/
|
||||
int cxgbe_up(struct adapter *adap)
|
||||
{
|
||||
enable_rx(adap);
|
||||
enable_rx(adap, &adap->sge.fw_evtq);
|
||||
t4_sge_tx_monitor_start(adap);
|
||||
t4_intr_enable(adap);
|
||||
adap->flags |= FULL_INIT_DONE;
|
||||
|
Loading…
Reference in New Issue
Block a user