mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
cxgbe(4): Rename rx_c_chan to rx_chan.
It is the equivalent of tx_chan but for receive so rx_chan is a better name. Initialize both using helper functions and make sure both are displayed in the sysctl MIB. MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
2c18289b72
commit
480ff89c67
|
@ -320,10 +320,10 @@ struct port_info {
|
||||||
uint8_t port_type;
|
uint8_t port_type;
|
||||||
uint8_t mod_type;
|
uint8_t mod_type;
|
||||||
uint8_t port_id;
|
uint8_t port_id;
|
||||||
uint8_t tx_chan;
|
uint8_t tx_chan; /* tx TP c-channel */
|
||||||
|
uint8_t rx_chan; /* rx TP c-channel */
|
||||||
uint8_t mps_bg_map; /* rx MPS buffer group bitmap */
|
uint8_t mps_bg_map; /* rx MPS buffer group bitmap */
|
||||||
uint8_t rx_e_chan_map; /* rx TP e-channel bitmap */
|
uint8_t rx_e_chan_map; /* rx TP e-channel bitmap */
|
||||||
uint8_t rx_c_chan; /* rx TP c-channel */
|
|
||||||
|
|
||||||
struct link_config link_cfg;
|
struct link_config link_cfg;
|
||||||
struct ifmedia media;
|
struct ifmedia media;
|
||||||
|
|
|
@ -6786,6 +6786,14 @@ static unsigned int t4_get_rx_c_chan(struct adapter *adap, int idx)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TP TX c-channel associated with the port.
|
||||||
|
*/
|
||||||
|
static unsigned int t4_get_tx_c_chan(struct adapter *adap, int idx)
|
||||||
|
{
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* t4_get_port_type_description - return Port Type string description
|
* t4_get_port_type_description - return Port Type string description
|
||||||
* @port_type: firmware Port Type enumeration
|
* @port_type: firmware Port Type enumeration
|
||||||
|
@ -9817,10 +9825,10 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id)
|
||||||
} while ((adap->params.portvec & (1 << j)) == 0);
|
} while ((adap->params.portvec & (1 << j)) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->tx_chan = j;
|
p->tx_chan = t4_get_tx_c_chan(adap, j);
|
||||||
|
p->rx_chan = t4_get_rx_c_chan(adap, j);
|
||||||
p->mps_bg_map = t4_get_mps_bg_map(adap, j);
|
p->mps_bg_map = t4_get_mps_bg_map(adap, j);
|
||||||
p->rx_e_chan_map = t4_get_rx_e_chan_map(adap, j);
|
p->rx_e_chan_map = t4_get_rx_e_chan_map(adap, j);
|
||||||
p->rx_c_chan = t4_get_rx_c_chan(adap, j);
|
|
||||||
p->lport = j;
|
p->lport = j;
|
||||||
|
|
||||||
if (!(adap->flags & IS_VF) ||
|
if (!(adap->flags & IS_VF) ||
|
||||||
|
|
|
@ -1924,7 +1924,7 @@ ccr_init_port(struct ccr_softc *sc, int port)
|
||||||
pi = sc->adapter->port[port];
|
pi = sc->adapter->port[port];
|
||||||
sc->ports[port].txq = &sc->adapter->sge.ctrlq[port];
|
sc->ports[port].txq = &sc->adapter->sge.ctrlq[port];
|
||||||
sc->ports[port].rxq = &sc->adapter->sge.rxq[pi->vi->first_rxq];
|
sc->ports[port].rxq = &sc->adapter->sge.rxq[pi->vi->first_rxq];
|
||||||
sc->ports[port].rx_channel_id = pi->rx_c_chan;
|
sc->ports[port].rx_channel_id = pi->rx_chan;
|
||||||
sc->ports[port].tx_channel_id = pi->tx_chan;
|
sc->ports[port].tx_channel_id = pi->tx_chan;
|
||||||
sc->ports[port].stats_queued = counter_u64_alloc(M_WAITOK);
|
sc->ports[port].stats_queued = counter_u64_alloc(M_WAITOK);
|
||||||
sc->ports[port].stats_completed = counter_u64_alloc(M_WAITOK);
|
sc->ports[port].stats_completed = counter_u64_alloc(M_WAITOK);
|
||||||
|
|
|
@ -7972,8 +7972,10 @@ cxgbe_sysctls(struct port_info *pi)
|
||||||
pi->mps_bg_map, "MPS buffer group map");
|
pi->mps_bg_map, "MPS buffer group map");
|
||||||
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_e_chan_map", CTLFLAG_RD,
|
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_e_chan_map", CTLFLAG_RD,
|
||||||
NULL, pi->rx_e_chan_map, "TP rx e-channel map");
|
NULL, pi->rx_e_chan_map, "TP rx e-channel map");
|
||||||
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_c_chan", CTLFLAG_RD, NULL,
|
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_chan", CTLFLAG_RD, NULL,
|
||||||
pi->rx_c_chan, "TP rx c-channel");
|
pi->tx_chan, "TP tx c-channel");
|
||||||
|
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_chan", CTLFLAG_RD, NULL,
|
||||||
|
pi->rx_chan, "TP rx c-channel");
|
||||||
|
|
||||||
if (sc->flags & IS_VF)
|
if (sc->flags & IS_VF)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue