net: Remove unnecessary driver assignments of ethtool_ringparam fields to zero
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1d0861acfb
commit
8b0c11679f
|
@ -1148,13 +1148,9 @@ static void
|
|||
typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||
{
|
||||
ering->rx_max_pending = RXENT_ENTRIES;
|
||||
ering->rx_mini_max_pending = 0;
|
||||
ering->rx_jumbo_max_pending = 0;
|
||||
ering->tx_max_pending = TXLO_ENTRIES - 1;
|
||||
|
||||
ering->rx_pending = RXENT_ENTRIES;
|
||||
ering->rx_mini_pending = 0;
|
||||
ering->rx_jumbo_pending = 0;
|
||||
ering->tx_pending = TXLO_ENTRIES - 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -3473,12 +3473,8 @@ static void atl1_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = ATL1_MAX_RFD;
|
||||
ring->tx_max_pending = ATL1_MAX_TPD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rxdr->count;
|
||||
ring->tx_pending = txdr->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int atl1_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -1398,8 +1398,6 @@ static void bcm_enet_get_ringparam(struct net_device *dev,
|
|||
/* rx/tx ring is actually only limited by memory */
|
||||
ering->rx_max_pending = 8192;
|
||||
ering->tx_max_pending = 8192;
|
||||
ering->rx_mini_max_pending = 0;
|
||||
ering->rx_jumbo_max_pending = 0;
|
||||
ering->rx_pending = priv->rx_ring_size;
|
||||
ering->tx_pending = priv->tx_ring_size;
|
||||
}
|
||||
|
|
|
@ -7155,11 +7155,9 @@ bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
|||
struct bnx2 *bp = netdev_priv(dev);
|
||||
|
||||
ering->rx_max_pending = MAX_TOTAL_RX_DESC_CNT;
|
||||
ering->rx_mini_max_pending = 0;
|
||||
ering->rx_jumbo_max_pending = MAX_TOTAL_RX_PG_DESC_CNT;
|
||||
|
||||
ering->rx_pending = bp->rx_ring_size;
|
||||
ering->rx_mini_pending = 0;
|
||||
ering->rx_jumbo_pending = bp->rx_pg_ring_size;
|
||||
|
||||
ering->tx_max_pending = MAX_TX_DESC_CNT;
|
||||
|
|
|
@ -1344,17 +1344,12 @@ static void bnx2x_get_ringparam(struct net_device *dev,
|
|||
struct bnx2x *bp = netdev_priv(dev);
|
||||
|
||||
ering->rx_max_pending = MAX_RX_AVAIL;
|
||||
ering->rx_mini_max_pending = 0;
|
||||
ering->rx_jumbo_max_pending = 0;
|
||||
|
||||
if (bp->rx_ring_size)
|
||||
ering->rx_pending = bp->rx_ring_size;
|
||||
else
|
||||
ering->rx_pending = MAX_RX_AVAIL;
|
||||
|
||||
ering->rx_mini_pending = 0;
|
||||
ering->rx_jumbo_pending = 0;
|
||||
|
||||
ering->tx_max_pending = MAX_TX_AVAIL;
|
||||
ering->tx_pending = bp->tx_ring_size;
|
||||
}
|
||||
|
|
|
@ -10514,7 +10514,6 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *
|
|||
struct tg3 *tp = netdev_priv(dev);
|
||||
|
||||
ering->rx_max_pending = tp->rx_std_ring_mask;
|
||||
ering->rx_mini_max_pending = 0;
|
||||
if (tg3_flag(tp, JUMBO_RING_ENABLE))
|
||||
ering->rx_jumbo_max_pending = tp->rx_jmb_ring_mask;
|
||||
else
|
||||
|
@ -10523,7 +10522,6 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *
|
|||
ering->tx_max_pending = TG3_TX_RING_SIZE - 1;
|
||||
|
||||
ering->rx_pending = tp->rx_pending;
|
||||
ering->rx_mini_pending = 0;
|
||||
if (tg3_flag(tp, JUMBO_RING_ENABLE))
|
||||
ering->rx_jumbo_pending = tp->rx_jumbo_pending;
|
||||
else
|
||||
|
|
|
@ -419,13 +419,9 @@ bnad_get_ringparam(struct net_device *netdev,
|
|||
struct bnad *bnad = netdev_priv(netdev);
|
||||
|
||||
ringparam->rx_max_pending = BNAD_MAX_RXQ_DEPTH;
|
||||
ringparam->rx_mini_max_pending = 0;
|
||||
ringparam->rx_jumbo_max_pending = 0;
|
||||
ringparam->tx_max_pending = BNAD_MAX_TXQ_DEPTH;
|
||||
|
||||
ringparam->rx_pending = bnad->rxq_depth;
|
||||
ringparam->rx_mini_max_pending = 0;
|
||||
ringparam->rx_jumbo_max_pending = 0;
|
||||
ringparam->tx_pending = bnad->txq_depth;
|
||||
}
|
||||
|
||||
|
|
|
@ -712,12 +712,10 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
|||
int jumbo_fl = t1_is_T1B(adapter) ? 1 : 0;
|
||||
|
||||
e->rx_max_pending = MAX_RX_BUFFERS;
|
||||
e->rx_mini_max_pending = 0;
|
||||
e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS;
|
||||
e->tx_max_pending = MAX_CMDQ_ENTRIES;
|
||||
|
||||
e->rx_pending = adapter->params.sge.freelQ_size[!jumbo_fl];
|
||||
e->rx_mini_pending = 0;
|
||||
e->rx_jumbo_pending = adapter->params.sge.freelQ_size[jumbo_fl];
|
||||
e->tx_pending = adapter->params.sge.cmdQ_size[0];
|
||||
}
|
||||
|
|
|
@ -1898,7 +1898,6 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
|||
const struct qset_params *q = &adapter->params.sge.qset[pi->first_qset];
|
||||
|
||||
e->rx_max_pending = MAX_RX_BUFFERS;
|
||||
e->rx_mini_max_pending = 0;
|
||||
e->rx_jumbo_max_pending = MAX_RX_JUMBO_BUFFERS;
|
||||
e->tx_max_pending = MAX_TXQ_ENTRIES;
|
||||
|
||||
|
|
|
@ -2502,12 +2502,8 @@ static void e100_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = rfds->max;
|
||||
ring->tx_max_pending = cbs->max;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rfds->count;
|
||||
ring->tx_pending = cbs->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int e100_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -540,12 +540,8 @@ static void e1000_get_ringparam(struct net_device *netdev,
|
|||
E1000_MAX_82544_RXD;
|
||||
ring->tx_max_pending = (mac_type < e1000_82544) ? E1000_MAX_TXD :
|
||||
E1000_MAX_82544_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rxdr->count;
|
||||
ring->tx_pending = txdr->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int e1000_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -612,12 +612,8 @@ static void e1000_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = E1000_MAX_RXD;
|
||||
ring->tx_max_pending = E1000_MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rx_ring->count;
|
||||
ring->tx_pending = tx_ring->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int e1000_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -705,12 +705,8 @@ static void igb_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = IGB_MAX_RXD;
|
||||
ring->tx_max_pending = IGB_MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = adapter->rx_ring_count;
|
||||
ring->tx_pending = adapter->tx_ring_count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int igb_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -259,12 +259,8 @@ static void igbvf_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = IGBVF_MAX_RXD;
|
||||
ring->tx_max_pending = IGBVF_MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rx_ring->count;
|
||||
ring->tx_pending = tx_ring->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int igbvf_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -492,12 +492,8 @@ ixgb_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = MAX_RXD;
|
||||
ring->tx_max_pending = MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rxdr->count;
|
||||
ring->tx_pending = txdr->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -846,12 +846,8 @@ static void ixgbe_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = IXGBE_MAX_RXD;
|
||||
ring->tx_max_pending = IXGBE_MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rx_ring->count;
|
||||
ring->tx_pending = tx_ring->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int ixgbe_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -281,12 +281,8 @@ static void ixgbevf_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = IXGBEVF_MAX_RXD;
|
||||
ring->tx_max_pending = IXGBEVF_MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rx_ring->count;
|
||||
ring->tx_pending = tx_ring->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int ixgbevf_set_ringparam(struct net_device *netdev,
|
||||
|
|
|
@ -1547,13 +1547,9 @@ mv643xx_eth_get_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
|
|||
|
||||
er->rx_max_pending = 4096;
|
||||
er->tx_max_pending = 4096;
|
||||
er->rx_mini_max_pending = 0;
|
||||
er->rx_jumbo_max_pending = 0;
|
||||
|
||||
er->rx_pending = mp->rx_ring_size;
|
||||
er->tx_pending = mp->tx_ring_size;
|
||||
er->rx_mini_pending = 0;
|
||||
er->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -497,13 +497,9 @@ static void skge_get_ring_param(struct net_device *dev,
|
|||
|
||||
p->rx_max_pending = MAX_RX_RING_SIZE;
|
||||
p->tx_max_pending = MAX_TX_RING_SIZE;
|
||||
p->rx_mini_max_pending = 0;
|
||||
p->rx_jumbo_max_pending = 0;
|
||||
|
||||
p->rx_pending = skge->rx_ring.count;
|
||||
p->tx_pending = skge->tx_ring.count;
|
||||
p->rx_mini_pending = 0;
|
||||
p->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int skge_set_ring_param(struct net_device *dev,
|
||||
|
|
|
@ -4088,13 +4088,9 @@ static void sky2_get_ringparam(struct net_device *dev,
|
|||
struct sky2_port *sky2 = netdev_priv(dev);
|
||||
|
||||
ering->rx_max_pending = RX_MAX_PENDING;
|
||||
ering->rx_mini_max_pending = 0;
|
||||
ering->rx_jumbo_max_pending = 0;
|
||||
ering->tx_max_pending = TX_MAX_PENDING;
|
||||
|
||||
ering->rx_pending = sky2->rx_pending;
|
||||
ering->rx_mini_pending = 0;
|
||||
ering->rx_jumbo_pending = 0;
|
||||
ering->tx_pending = sky2->tx_pending;
|
||||
}
|
||||
|
||||
|
|
|
@ -5522,14 +5522,12 @@ static void s2io_ethtool_gringparam(struct net_device *dev,
|
|||
ering->rx_jumbo_max_pending = MAX_RX_DESC_2;
|
||||
}
|
||||
|
||||
ering->rx_mini_max_pending = 0;
|
||||
ering->tx_max_pending = MAX_TX_DESC;
|
||||
|
||||
for (i = 0; i < sp->config.rx_ring_num; i++)
|
||||
rx_desc_count += sp->config.rx_cfg[i].num_rxd;
|
||||
ering->rx_pending = rx_desc_count;
|
||||
ering->rx_jumbo_pending = rx_desc_count;
|
||||
ering->rx_mini_pending = 0;
|
||||
|
||||
for (i = 0; i < sp->config.tx_fifo_num; i++)
|
||||
tx_desc_count += sp->config.tx_cfg[i].fifo_len;
|
||||
|
|
|
@ -4280,13 +4280,9 @@ static void nv_get_ringparam(struct net_device *dev, struct ethtool_ringparam* r
|
|||
struct fe_priv *np = netdev_priv(dev);
|
||||
|
||||
ring->rx_max_pending = (np->desc_ver == DESC_VER_1) ? RING_MAX_DESC_VER_1 : RING_MAX_DESC_VER_2_3;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->tx_max_pending = (np->desc_ver == DESC_VER_1) ? RING_MAX_DESC_VER_1 : RING_MAX_DESC_VER_2_3;
|
||||
|
||||
ring->rx_pending = np->rx_ring_size;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
ring->tx_pending = np->tx_ring_size;
|
||||
}
|
||||
|
||||
|
|
|
@ -273,12 +273,8 @@ static void pch_gbe_get_ringparam(struct net_device *netdev,
|
|||
|
||||
ring->rx_max_pending = PCH_GBE_MAX_RXD;
|
||||
ring->tx_max_pending = PCH_GBE_MAX_TXD;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = rxdr->count;
|
||||
ring->tx_pending = txdr->count;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -413,9 +413,6 @@ netxen_nic_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
ring->tx_max_pending = MAX_CMD_DESCRIPTORS;
|
||||
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_mini_pending = 0;
|
||||
}
|
||||
|
||||
static u32
|
||||
|
|
|
@ -418,9 +418,6 @@ qlcnic_get_ringparam(struct net_device *dev,
|
|||
ring->rx_max_pending = adapter->max_rxd;
|
||||
ring->rx_jumbo_max_pending = adapter->max_jumbo_rxd;
|
||||
ring->tx_max_pending = MAX_CMD_DESCRIPTORS;
|
||||
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_mini_pending = 0;
|
||||
}
|
||||
|
||||
static u32
|
||||
|
|
|
@ -682,12 +682,8 @@ static void efx_ethtool_get_ringparam(struct net_device *net_dev,
|
|||
|
||||
ring->rx_max_pending = EFX_MAX_DMAQ_SIZE;
|
||||
ring->tx_max_pending = EFX_MAX_DMAQ_SIZE;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = efx->rxq_entries;
|
||||
ring->tx_pending = efx->txq_entries;
|
||||
ring->rx_mini_pending = 0;
|
||||
ring->rx_jumbo_pending = 0;
|
||||
}
|
||||
|
||||
static int efx_ethtool_set_ringparam(struct net_device *net_dev,
|
||||
|
|
Loading…
Reference in New Issue