提交 026b471b 编写于 作者: W Weilin Chang 提交者: David S. Miller

liquidio: fix wrong information about channels reported to ethtool

Information reported to ethtool about channels is sometimes wrong for PF,
and always wrong for VF.  Fix them by getting the information from the
right fields from the right structs.
Signed-off-by: NWeilin Chang <weilin.chang@cavium.com>
Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: NDerek Chickles <derek.chickles@cavium.com>
Signed-off-by: NSatanand Burla <satananda.burla@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f784ad3d
......@@ -296,12 +296,16 @@ lio_ethtool_get_channels(struct net_device *dev,
rx_count = CFG_GET_NUM_RXQS_NIC_IF(conf6x, lio->ifidx);
tx_count = CFG_GET_NUM_TXQS_NIC_IF(conf6x, lio->ifidx);
} else if (OCTEON_CN23XX_PF(oct)) {
struct octeon_config *conf23 = CHIP_CONF(oct, cn23xx_pf);
max_rx = CFG_GET_OQ_MAX_Q(conf23);
max_tx = CFG_GET_IQ_MAX_Q(conf23);
rx_count = CFG_GET_NUM_RXQS_NIC_IF(conf23, lio->ifidx);
tx_count = CFG_GET_NUM_TXQS_NIC_IF(conf23, lio->ifidx);
max_rx = oct->sriov_info.num_pf_rings;
max_tx = oct->sriov_info.num_pf_rings;
rx_count = lio->linfo.num_rxpciq;
tx_count = lio->linfo.num_txpciq;
} else if (OCTEON_CN23XX_VF(oct)) {
max_tx = oct->sriov_info.rings_per_vf;
max_rx = oct->sriov_info.rings_per_vf;
rx_count = lio->linfo.num_rxpciq;
tx_count = lio->linfo.num_txpciq;
}
channel->max_rx = max_rx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册