Merge branch 'cxgb4'
Hariprasad Shenai says: ==================== Misc. fixes for cxgb4 and cxgb4vf driver This series of patch provides fixes for cxgb4 and cxgb4vf driver related to rx checksum counter and decodes module type a bit more for ethtool output. The patches series is created against David Miller's 'net-next' tree. We would like to request this patch series to get merged via David Miller's 'net-next' tree. We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
51ee42efa0
3 changed files with 18 additions and 10 deletions
|
@ -2252,12 +2252,19 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
|||
else if (p->port_type == FW_PORT_TYPE_FIBER_XFI ||
|
||||
p->port_type == FW_PORT_TYPE_FIBER_XAUI)
|
||||
cmd->port = PORT_FIBRE;
|
||||
else if (p->port_type == FW_PORT_TYPE_SFP) {
|
||||
if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE ||
|
||||
p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE)
|
||||
else if (p->port_type == FW_PORT_TYPE_SFP ||
|
||||
p->port_type == FW_PORT_TYPE_QSFP_10G ||
|
||||
p->port_type == FW_PORT_TYPE_QSFP) {
|
||||
if (p->mod_type == FW_PORT_MOD_TYPE_LR ||
|
||||
p->mod_type == FW_PORT_MOD_TYPE_SR ||
|
||||
p->mod_type == FW_PORT_MOD_TYPE_ER ||
|
||||
p->mod_type == FW_PORT_MOD_TYPE_LRM)
|
||||
cmd->port = PORT_FIBRE;
|
||||
else if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE ||
|
||||
p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE)
|
||||
cmd->port = PORT_DA;
|
||||
else
|
||||
cmd->port = PORT_FIBRE;
|
||||
cmd->port = PORT_OTHER;
|
||||
} else
|
||||
cmd->port = PORT_OTHER;
|
||||
|
||||
|
|
|
@ -1697,7 +1697,8 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
|
|||
return handle_trace_pkt(q->adap, si);
|
||||
|
||||
pkt = (const struct cpl_rx_pkt *)rsp;
|
||||
csum_ok = pkt->csum_calc && !pkt->err_vec;
|
||||
csum_ok = pkt->csum_calc && !pkt->err_vec &&
|
||||
(q->netdev->features & NETIF_F_RXCSUM);
|
||||
if ((pkt->l2info & htonl(RXF_TCP)) &&
|
||||
(q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) {
|
||||
do_gro(rxq, si, pkt);
|
||||
|
@ -1720,8 +1721,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
|
|||
|
||||
rxq->stats.pkts++;
|
||||
|
||||
if (csum_ok && (q->netdev->features & NETIF_F_RXCSUM) &&
|
||||
(pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
|
||||
if (csum_ok && (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
|
||||
if (!pkt->ip_frag) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
rxq->stats.rx_cso++;
|
||||
|
|
|
@ -1510,7 +1510,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
|
|||
{
|
||||
struct sk_buff *skb;
|
||||
const struct cpl_rx_pkt *pkt = (void *)rsp;
|
||||
bool csum_ok = pkt->csum_calc && !pkt->err_vec;
|
||||
bool csum_ok = pkt->csum_calc && !pkt->err_vec &&
|
||||
(rspq->netdev->features & NETIF_F_RXCSUM);
|
||||
struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq);
|
||||
|
||||
/*
|
||||
|
@ -1538,8 +1539,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
|
|||
skb_record_rx_queue(skb, rspq->idx);
|
||||
rxq->stats.pkts++;
|
||||
|
||||
if (csum_ok && (rspq->netdev->features & NETIF_F_RXCSUM) &&
|
||||
!pkt->err_vec && (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) {
|
||||
if (csum_ok && !pkt->err_vec &&
|
||||
(be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) {
|
||||
if (!pkt->ip_frag)
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue