ethtool: extend ringparam setting/getting API with rx_buf_len
Add two new parameters kernel_ringparam and extack for .get_ringparam and .set_ringparam to extend more ring params through netlink. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: hongrongxuan <hongrongxuan@huawei.com> Conflicts: drivers/net/can/c_can/c_can_ethtool.c drivers/net/ethernet/huawei/hinic/hinic_ethtool.c drivers/net/ethernet/intel/igc/igc_ethtool.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c drivers/net/ethernet/micrel/ksz884x.c drivers/net/ethernet/realtek/r8169_main.c drivers/net/ethernet/sfc/ef100_ethtool.c drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c drivers/net/ethernet/ti/am65-cpsw-ethtool.c drivers/net/ethernet/xilinx/ll_temac_main.c drivers/net/netdevsim/ethtool.c
This commit is contained in:
parent
32d15e73d2
commit
94e6934ae4
|
@ -1349,7 +1349,9 @@ static void vector_net_get_drvinfo(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void vector_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct vector_private *vp = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -1139,7 +1139,9 @@ typhoon_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
|||
}
|
||||
|
||||
static void
|
||||
typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||
typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
ering->rx_max_pending = RXENT_ENTRIES;
|
||||
ering->tx_max_pending = TXLO_ENTRIES - 1;
|
||||
|
|
|
@ -414,7 +414,9 @@ static void ena_get_drvinfo(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void ena_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ena_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -425,7 +427,9 @@ static void ena_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int ena_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ena_adapter *adapter = netdev_priv(netdev);
|
||||
u32 new_tx_size, new_rx_size;
|
||||
|
|
|
@ -872,7 +872,9 @@ static int pcnet32_nway_reset(struct net_device *dev)
|
|||
}
|
||||
|
||||
static void pcnet32_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct pcnet32_private *lp = netdev_priv(dev);
|
||||
|
||||
|
@ -883,7 +885,9 @@ static void pcnet32_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int pcnet32_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct pcnet32_private *lp = netdev_priv(dev);
|
||||
unsigned long flags;
|
||||
|
|
|
@ -646,8 +646,11 @@ static int xgbe_get_module_eeprom(struct net_device *netdev,
|
|||
return pdata->phy_if.module_eeprom(pdata, eeprom, data);
|
||||
}
|
||||
|
||||
static void xgbe_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ringparam)
|
||||
static void
|
||||
xgbe_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ringparam,
|
||||
struct kernel_ethtool_ringparam *kernel_ringparam,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct xgbe_prv_data *pdata = netdev_priv(netdev);
|
||||
|
||||
|
@ -658,7 +661,9 @@ static void xgbe_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int xgbe_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ringparam)
|
||||
struct ethtool_ringparam *ringparam,
|
||||
struct kernel_ethtool_ringparam *kernel_ringparam,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct xgbe_prv_data *pdata = netdev_priv(netdev);
|
||||
unsigned int rx, tx;
|
||||
|
|
|
@ -524,7 +524,9 @@ static int aq_ethtool_set_pauseparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
static void aq_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct aq_nic_s *aq_nic = netdev_priv(ndev);
|
||||
struct aq_nic_cfg_s *aq_nic_cfg = aq_nic_get_cfg(aq_nic);
|
||||
|
@ -537,7 +539,9 @@ static void aq_get_ringparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
static int aq_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
int err = 0;
|
||||
bool ndev_running = false;
|
||||
|
|
|
@ -3442,7 +3442,9 @@ static void atl1_get_regs(struct net_device *netdev, struct ethtool_regs *regs,
|
|||
}
|
||||
|
||||
static void atl1_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct atl1_adapter *adapter = netdev_priv(netdev);
|
||||
struct atl1_tpd_ring *txdr = &adapter->tpd_ring;
|
||||
|
@ -3455,7 +3457,9 @@ static void atl1_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int atl1_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct atl1_adapter *adapter = netdev_priv(netdev);
|
||||
struct atl1_tpd_ring *tpdr = &adapter->tpd_ring;
|
||||
|
|
|
@ -1965,7 +1965,9 @@ static int b44_set_link_ksettings(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void b44_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct b44 *bp = netdev_priv(dev);
|
||||
|
||||
|
@ -1976,7 +1978,9 @@ static void b44_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int b44_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct b44 *bp = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -1482,8 +1482,11 @@ static int bcm_enet_set_link_ksettings(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
static void bcm_enet_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static void
|
||||
bcm_enet_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bcm_enet_priv *priv;
|
||||
|
||||
|
@ -1497,7 +1500,9 @@ static void bcm_enet_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int bcm_enet_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bcm_enet_priv *priv;
|
||||
int was_running;
|
||||
|
@ -2583,8 +2588,11 @@ static void bcm_enetsw_get_ethtool_stats(struct net_device *netdev,
|
|||
}
|
||||
}
|
||||
|
||||
static void bcm_enetsw_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static void
|
||||
bcm_enetsw_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bcm_enet_priv *priv;
|
||||
|
||||
|
@ -2599,8 +2607,11 @@ static void bcm_enetsw_get_ringparam(struct net_device *dev,
|
|||
ering->tx_pending = priv->tx_ring_size;
|
||||
}
|
||||
|
||||
static int bcm_enetsw_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static int
|
||||
bcm_enetsw_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bcm_enet_priv *priv;
|
||||
int was_running;
|
||||
|
|
|
@ -7324,7 +7324,9 @@ static int bnx2_set_coalesce(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void
|
||||
bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||
bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bnx2 *bp = netdev_priv(dev);
|
||||
|
||||
|
@ -7395,7 +7397,9 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx, bool reset_irq)
|
|||
}
|
||||
|
||||
static int
|
||||
bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||
bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bnx2 *bp = netdev_priv(dev);
|
||||
int rc;
|
||||
|
|
|
@ -1920,7 +1920,9 @@ static int bnx2x_set_coalesce(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void bnx2x_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bnx2x *bp = netdev_priv(dev);
|
||||
|
||||
|
@ -1944,7 +1946,9 @@ static void bnx2x_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int bnx2x_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bnx2x *bp = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -12416,7 +12416,10 @@ static int tg3_nway_reset(struct net_device *dev)
|
|||
return r;
|
||||
}
|
||||
|
||||
static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||
static void tg3_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct tg3 *tp = netdev_priv(dev);
|
||||
|
||||
|
@ -12437,7 +12440,10 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *
|
|||
ering->tx_pending = tp->napi[0].tx_pending;
|
||||
}
|
||||
|
||||
static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
|
||||
static int tg3_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct tg3 *tp = netdev_priv(dev);
|
||||
int i, irq_sync = 0, err = 0;
|
||||
|
|
|
@ -406,7 +406,9 @@ static int bnad_set_coalesce(struct net_device *netdev,
|
|||
|
||||
static void
|
||||
bnad_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ringparam)
|
||||
struct ethtool_ringparam *ringparam,
|
||||
struct kernel_ethtool_ringparam *kernel_ringparam,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bnad *bnad = netdev_priv(netdev);
|
||||
|
||||
|
@ -419,7 +421,9 @@ bnad_get_ringparam(struct net_device *netdev,
|
|||
|
||||
static int
|
||||
bnad_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ringparam)
|
||||
struct ethtool_ringparam *ringparam,
|
||||
struct kernel_ethtool_ringparam *kernel_ringparam,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
int i, current_err, err = 0;
|
||||
struct bnad *bnad = netdev_priv(netdev);
|
||||
|
|
|
@ -2767,7 +2767,9 @@ static int macb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
|
|||
}
|
||||
|
||||
static void macb_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct macb *bp = netdev_priv(netdev);
|
||||
|
||||
|
@ -2779,7 +2781,9 @@ static void macb_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int macb_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct macb *bp = netdev_priv(netdev);
|
||||
u32 new_rx_size, new_tx_size;
|
||||
|
|
|
@ -948,7 +948,9 @@ static int lio_set_phys_id(struct net_device *netdev,
|
|||
|
||||
static void
|
||||
lio_ethtool_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct lio *lio = GET_LIO(netdev);
|
||||
struct octeon_device *oct = lio->oct_dev;
|
||||
|
@ -1253,8 +1255,11 @@ static int lio_reset_queues(struct net_device *netdev, uint32_t num_qs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lio_ethtool_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static int
|
||||
lio_ethtool_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
u32 rx_count, tx_count, rx_count_old, tx_count_old;
|
||||
struct lio *lio = GET_LIO(netdev);
|
||||
|
|
|
@ -468,7 +468,9 @@ static int nicvf_get_coalesce(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void nicvf_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct nicvf *nic = netdev_priv(netdev);
|
||||
struct queue_set *qs = nic->qs;
|
||||
|
@ -480,7 +482,9 @@ static void nicvf_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int nicvf_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct nicvf *nic = netdev_priv(netdev);
|
||||
struct queue_set *qs = nic->qs;
|
||||
|
|
|
@ -710,7 +710,9 @@ static int set_pauseparam(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
||||
static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
|
||||
struct kernel_ethtool_ringparam *kernel_e,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct adapter *adapter = dev->ml_priv;
|
||||
int jumbo_fl = t1_is_T1B(adapter) ? 1 : 0;
|
||||
|
@ -724,7 +726,9 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
|||
e->tx_pending = adapter->params.sge.cmdQ_size[0];
|
||||
}
|
||||
|
||||
static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
||||
static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
|
||||
struct kernel_ethtool_ringparam *kernel_e,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct adapter *adapter = dev->ml_priv;
|
||||
int jumbo_fl = t1_is_T1B(adapter) ? 1 : 0;
|
||||
|
|
|
@ -1951,7 +1951,9 @@ static int set_pauseparam(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
||||
static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
|
||||
struct kernel_ethtool_ringparam *kernel_e,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct port_info *pi = netdev_priv(dev);
|
||||
struct adapter *adapter = pi->adapter;
|
||||
|
@ -1967,7 +1969,9 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
|||
e->tx_pending = q->txq_size[0];
|
||||
}
|
||||
|
||||
static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
||||
static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
|
||||
struct kernel_ethtool_ringparam *kernel_e,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct port_info *pi = netdev_priv(dev);
|
||||
struct adapter *adapter = pi->adapter;
|
||||
|
|
|
@ -820,7 +820,9 @@ static int set_pauseparam(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
||||
static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
|
||||
struct kernel_ethtool_ringparam *kernel_e,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
const struct port_info *pi = netdev_priv(dev);
|
||||
const struct sge *s = &pi->adapter->sge;
|
||||
|
@ -836,7 +838,9 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
|||
e->tx_pending = s->ethtxq[pi->first_qset].q.size;
|
||||
}
|
||||
|
||||
static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
||||
static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e,
|
||||
struct kernel_ethtool_ringparam *kernel_e,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
int i;
|
||||
const struct port_info *pi = netdev_priv(dev);
|
||||
|
|
|
@ -1594,7 +1594,9 @@ static void cxgb4vf_set_msglevel(struct net_device *dev, u32 msglevel)
|
|||
* first Queue Set.
|
||||
*/
|
||||
static void cxgb4vf_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *rp)
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
const struct port_info *pi = netdev_priv(dev);
|
||||
const struct sge *s = &pi->adapter->sge;
|
||||
|
@ -1617,7 +1619,9 @@ static void cxgb4vf_get_ringparam(struct net_device *dev,
|
|||
* device -- after vetting them of course!
|
||||
*/
|
||||
static int cxgb4vf_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *rp)
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
const struct port_info *pi = netdev_priv(dev);
|
||||
struct adapter *adapter = pi->adapter;
|
||||
|
|
|
@ -178,7 +178,9 @@ static void enic_get_strings(struct net_device *netdev, u32 stringset,
|
|||
}
|
||||
|
||||
static void enic_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct enic *enic = netdev_priv(netdev);
|
||||
struct vnic_enet_config *c = &enic->config;
|
||||
|
@ -190,7 +192,9 @@ static void enic_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int enic_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct enic *enic = netdev_priv(netdev);
|
||||
struct vnic_enet_config *c = &enic->config;
|
||||
|
|
|
@ -2122,7 +2122,9 @@ static void gmac_get_pauseparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void gmac_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *rp)
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct gemini_ethernet_port *port = netdev_priv(netdev);
|
||||
union gmac_config0 config0;
|
||||
|
@ -2141,7 +2143,9 @@ static void gmac_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int gmac_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *rp)
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct gemini_ethernet_port *port = netdev_priv(netdev);
|
||||
int err = 0;
|
||||
|
|
|
@ -684,7 +684,9 @@ static int be_get_link_ksettings(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void be_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct be_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -945,7 +945,9 @@ static void ethoc_get_regs(struct net_device *dev, struct ethtool_regs *regs,
|
|||
}
|
||||
|
||||
static void ethoc_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ethoc *priv = netdev_priv(dev);
|
||||
|
||||
|
@ -961,7 +963,9 @@ static void ethoc_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int ethoc_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ethoc *priv = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -1151,8 +1151,11 @@ static void ftgmac100_get_drvinfo(struct net_device *netdev,
|
|||
strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info));
|
||||
}
|
||||
|
||||
static void ftgmac100_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static void
|
||||
ftgmac100_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ftgmac100 *priv = netdev_priv(netdev);
|
||||
|
||||
|
@ -1163,8 +1166,11 @@ static void ftgmac100_get_ringparam(struct net_device *netdev,
|
|||
ering->tx_pending = priv->tx_q_entries;
|
||||
}
|
||||
|
||||
static int ftgmac100_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static int
|
||||
ftgmac100_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ftgmac100 *priv = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -537,7 +537,9 @@ static int enetc_set_rxfh(struct net_device *ndev, const u32 *indir,
|
|||
}
|
||||
|
||||
static void enetc_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct enetc_ndev_priv *priv = netdev_priv(ndev);
|
||||
|
||||
|
|
|
@ -405,7 +405,9 @@ static int gfar_scoalesce(struct net_device *dev,
|
|||
* rx, rx_mini, and rx_jumbo rings are the same size, as mini and
|
||||
* jumbo are ignored by the driver */
|
||||
static void gfar_gringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *rvals)
|
||||
struct ethtool_ringparam *rvals,
|
||||
struct kernel_ethtool_ringparam *kernel_rvals,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct gfar_private *priv = netdev_priv(dev);
|
||||
struct gfar_priv_tx_q *tx_queue = NULL;
|
||||
|
@ -432,7 +434,9 @@ static void gfar_gringparam(struct net_device *dev,
|
|||
* necessary so that we don't mess things up while we're in motion.
|
||||
*/
|
||||
static int gfar_sringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *rvals)
|
||||
struct ethtool_ringparam *rvals,
|
||||
struct kernel_ethtool_ringparam *kernel_rvals,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct gfar_private *priv = netdev_priv(dev);
|
||||
int err = 0, i;
|
||||
|
|
|
@ -207,7 +207,9 @@ uec_get_regs(struct net_device *netdev,
|
|||
|
||||
static void
|
||||
uec_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ucc_geth_private *ugeth = netdev_priv(netdev);
|
||||
struct ucc_geth_info *ug_info = ugeth->ug_info;
|
||||
|
@ -226,7 +228,9 @@ uec_get_ringparam(struct net_device *netdev,
|
|||
|
||||
static int
|
||||
uec_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ucc_geth_private *ugeth = netdev_priv(netdev);
|
||||
struct ucc_geth_info *ug_info = ugeth->ug_info;
|
||||
|
|
|
@ -208,7 +208,9 @@ static int gve_set_channels(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void gve_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *cmd)
|
||||
struct ethtool_ringparam *cmd,
|
||||
struct kernel_ethtool_ringparam *kernel_cmd,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct gve_priv *priv = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -664,9 +664,13 @@ static void hns_nic_get_drvinfo(struct net_device *net_dev,
|
|||
* hns_get_ringparam - get ring parameter
|
||||
* @dev: net device
|
||||
* @param: ethtool parameter
|
||||
* @kernel_param: ethtool external parameter
|
||||
* @extack: netlink extended ACK report struct
|
||||
*/
|
||||
static void hns_get_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct hns_nic_priv *priv = netdev_priv(net_dev);
|
||||
struct hnae_ae_ops *ops;
|
||||
|
|
|
@ -587,7 +587,9 @@ static u32 hns3_get_link(struct net_device *netdev)
|
|||
}
|
||||
|
||||
static void hns3_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct hns3_nic_priv *priv = netdev_priv(netdev);
|
||||
struct hnae3_handle *h = priv->ae_handle;
|
||||
|
@ -952,7 +954,9 @@ static int hns3_check_ringparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
static int hns3_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct hns3_nic_priv *priv = netdev_priv(ndev);
|
||||
struct hnae3_handle *h = priv->ae_handle;
|
||||
|
|
|
@ -133,7 +133,9 @@ static void hinic_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void hinic_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
ring->rx_max_pending = HINIC_RQ_DEPTH;
|
||||
ring->tx_max_pending = HINIC_SQ_DEPTH;
|
||||
|
|
|
@ -2137,8 +2137,11 @@ emac_ethtool_set_link_ksettings(struct net_device *ndev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void emac_ethtool_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *rp)
|
||||
static void
|
||||
emac_ethtool_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
rp->rx_max_pending = rp->rx_pending = NUM_RX_BUFF;
|
||||
rp->tx_max_pending = rp->tx_pending = NUM_TX_BUFF;
|
||||
|
|
|
@ -2529,7 +2529,9 @@ static u32 ibmvnic_get_link(struct net_device *netdev)
|
|||
}
|
||||
|
||||
static void ibmvnic_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -2549,7 +2551,9 @@ static void ibmvnic_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int ibmvnic_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
int ret;
|
||||
|
|
|
@ -2555,7 +2555,9 @@ static int e100_set_eeprom(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void e100_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
struct param_range *rfds = &nic->params.rfds;
|
||||
|
@ -2568,7 +2570,9 @@ static void e100_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int e100_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
struct param_range *rfds = &nic->params.rfds;
|
||||
|
|
|
@ -541,7 +541,9 @@ static void e1000_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void e1000_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
|
@ -558,7 +560,9 @@ static void e1000_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int e1000_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
|
|
|
@ -650,7 +650,9 @@ static void e1000_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void e1000_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -661,7 +663,9 @@ static void e1000_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int e1000_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_ring *temp_tx = NULL, *temp_rx = NULL;
|
||||
|
|
|
@ -503,7 +503,9 @@ static void fm10k_set_msglevel(struct net_device *netdev, u32 data)
|
|||
}
|
||||
|
||||
static void fm10k_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct fm10k_intfc *interface = netdev_priv(netdev);
|
||||
|
||||
|
@ -518,7 +520,9 @@ static void fm10k_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int fm10k_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct fm10k_intfc *interface = netdev_priv(netdev);
|
||||
struct fm10k_ring *temp_ring;
|
||||
|
|
|
@ -1915,7 +1915,9 @@ static void i40e_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void i40e_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct i40e_netdev_priv *np = netdev_priv(netdev);
|
||||
struct i40e_pf *pf = np->vsi->back;
|
||||
|
@ -1943,7 +1945,9 @@ static bool i40e_active_tx_ring_index(struct i40e_vsi *vsi, u16 index)
|
|||
}
|
||||
|
||||
static int i40e_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct i40e_ring *tx_rings = NULL, *rx_rings = NULL;
|
||||
struct i40e_netdev_priv *np = netdev_priv(netdev);
|
||||
|
|
|
@ -580,12 +580,16 @@ static void iavf_get_drvinfo(struct net_device *netdev,
|
|||
* iavf_get_ringparam - Get ring parameters
|
||||
* @netdev: network interface device structure
|
||||
* @ring: ethtool ringparam structure
|
||||
* @kernel_ring: ethtool extenal ringparam structure
|
||||
* @extack: netlink extended ACK report struct
|
||||
*
|
||||
* Returns current ring parameters. TX and RX rings are reported separately,
|
||||
* but the number of rings is not reported.
|
||||
**/
|
||||
static void iavf_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct iavf_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -599,12 +603,16 @@ static void iavf_get_ringparam(struct net_device *netdev,
|
|||
* iavf_set_ringparam - Set ring parameters
|
||||
* @netdev: network interface device structure
|
||||
* @ring: ethtool ringparam structure
|
||||
* @kernel_ring: ethtool external ringparam structure
|
||||
* @extack: netlink extended ACK report struct
|
||||
*
|
||||
* Sets ring parameters. TX and RX rings are controlled separately, but the
|
||||
* number of rings is not specified, so all rings get the same settings.
|
||||
**/
|
||||
static int iavf_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct iavf_adapter *adapter = netdev_priv(netdev);
|
||||
u32 new_rx_count, new_tx_count;
|
||||
|
|
|
@ -2593,7 +2593,9 @@ ice_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
|
|||
}
|
||||
|
||||
static void
|
||||
ice_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
||||
ice_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
struct ice_vsi *vsi = np->vsi;
|
||||
|
@ -2611,7 +2613,9 @@ ice_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
|||
}
|
||||
|
||||
static int
|
||||
ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
||||
ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ice_ring *tx_rings = NULL, *rx_rings = NULL;
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
|
|
|
@ -857,7 +857,9 @@ static void igb_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void igb_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -868,7 +870,9 @@ static void igb_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int igb_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(netdev);
|
||||
struct igb_ring *temp_ring;
|
||||
|
|
|
@ -177,7 +177,9 @@ static void igbvf_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void igbvf_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igbvf_adapter *adapter = netdev_priv(netdev);
|
||||
struct igbvf_ring *tx_ring = adapter->tx_ring;
|
||||
|
@ -190,7 +192,9 @@ static void igbvf_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int igbvf_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igbvf_adapter *adapter = netdev_priv(netdev);
|
||||
struct igbvf_ring *temp_ring;
|
||||
|
|
|
@ -471,7 +471,9 @@ static int igc_set_eeprom(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void igc_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igc_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -482,7 +484,9 @@ static void igc_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int igc_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igc_adapter *adapter = netdev_priv(netdev);
|
||||
struct igc_ring *temp_ring;
|
||||
|
|
|
@ -466,7 +466,9 @@ ixgb_get_drvinfo(struct net_device *netdev,
|
|||
|
||||
static void
|
||||
ixgb_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ixgb_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgb_desc_ring *txdr = &adapter->tx_ring;
|
||||
|
@ -480,7 +482,9 @@ ixgb_get_ringparam(struct net_device *netdev,
|
|||
|
||||
static int
|
||||
ixgb_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ixgb_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgb_desc_ring *txdr = &adapter->tx_ring;
|
||||
|
|
|
@ -1017,7 +1017,9 @@ static void ixgbe_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void ixgbe_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgbe_ring *tx_ring = adapter->tx_ring[0];
|
||||
|
@ -1030,7 +1032,9 @@ static void ixgbe_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int ixgbe_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgbe_ring *temp_ring;
|
||||
|
|
|
@ -227,7 +227,9 @@ static void ixgbevf_get_drvinfo(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void ixgbevf_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ixgbevf_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -238,7 +240,9 @@ static void ixgbevf_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int ixgbevf_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ixgbevf_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgbevf_ring *tx_ring = NULL, *rx_ring = NULL;
|
||||
|
|
|
@ -1642,7 +1642,9 @@ static int mv643xx_eth_set_coalesce(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void
|
||||
mv643xx_eth_get_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
|
||||
mv643xx_eth_get_ringparam(struct net_device *dev, struct ethtool_ringparam *er,
|
||||
struct kernel_ethtool_ringparam *kernel_er,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mv643xx_eth_private *mp = netdev_priv(dev);
|
||||
|
||||
|
@ -1654,7 +1656,9 @@ mv643xx_eth_get_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
|
|||
}
|
||||
|
||||
static int
|
||||
mv643xx_eth_set_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
|
||||
mv643xx_eth_set_ringparam(struct net_device *dev, struct ethtool_ringparam *er,
|
||||
struct kernel_ethtool_ringparam *kernel_er,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mv643xx_eth_private *mp = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -4090,8 +4090,11 @@ static void mvneta_ethtool_get_drvinfo(struct net_device *dev,
|
|||
}
|
||||
|
||||
|
||||
static void mvneta_ethtool_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static void
|
||||
mvneta_ethtool_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(netdev);
|
||||
|
||||
|
@ -4101,8 +4104,11 @@ static void mvneta_ethtool_get_ringparam(struct net_device *netdev,
|
|||
ring->tx_pending = pp->tx_ring_size;
|
||||
}
|
||||
|
||||
static int mvneta_ethtool_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static int
|
||||
mvneta_ethtool_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -4100,8 +4100,11 @@ static void mvpp2_ethtool_get_drvinfo(struct net_device *dev,
|
|||
sizeof(drvinfo->bus_info));
|
||||
}
|
||||
|
||||
static void mvpp2_ethtool_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static void
|
||||
mvpp2_ethtool_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mvpp2_port *port = netdev_priv(dev);
|
||||
|
||||
|
@ -4111,8 +4114,11 @@ static void mvpp2_ethtool_get_ringparam(struct net_device *dev,
|
|||
ring->tx_pending = port->tx_ring_size;
|
||||
}
|
||||
|
||||
static int mvpp2_ethtool_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static int
|
||||
mvpp2_ethtool_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mvpp2_port *port = netdev_priv(dev);
|
||||
u16 prev_rx_ring_size = port->rx_ring_size;
|
||||
|
|
|
@ -492,7 +492,9 @@ static void skge_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
|||
}
|
||||
|
||||
static void skge_get_ring_param(struct net_device *dev,
|
||||
struct ethtool_ringparam *p)
|
||||
struct ethtool_ringparam *p,
|
||||
struct kernel_ethtool_ringparam *kernel_p,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct skge_port *skge = netdev_priv(dev);
|
||||
|
||||
|
@ -504,7 +506,9 @@ static void skge_get_ring_param(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int skge_set_ring_param(struct net_device *dev,
|
||||
struct ethtool_ringparam *p)
|
||||
struct ethtool_ringparam *p,
|
||||
struct kernel_ethtool_ringparam *kernel_p,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct skge_port *skge = netdev_priv(dev);
|
||||
int err = 0;
|
||||
|
|
|
@ -4147,7 +4147,9 @@ static unsigned long roundup_ring_size(unsigned long pending)
|
|||
}
|
||||
|
||||
static void sky2_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct sky2_port *sky2 = netdev_priv(dev);
|
||||
|
||||
|
@ -4159,7 +4161,9 @@ static void sky2_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int sky2_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct sky2_port *sky2 = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -1120,7 +1120,9 @@ static void mlx4_en_get_pauseparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int mlx4_en_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx4_en_priv *priv = netdev_priv(dev);
|
||||
struct mlx4_en_dev *mdev = priv->mdev;
|
||||
|
@ -1187,7 +1189,9 @@ out:
|
|||
}
|
||||
|
||||
static void mlx4_en_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx4_en_priv *priv = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -312,7 +312,9 @@ void mlx5e_ethtool_get_ringparam(struct mlx5e_priv *priv,
|
|||
}
|
||||
|
||||
static void mlx5e_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx5e_priv *priv = netdev_priv(dev);
|
||||
|
||||
|
@ -379,7 +381,9 @@ unlock:
|
|||
}
|
||||
|
||||
static int mlx5e_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx5e_priv *priv = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -218,16 +218,22 @@ static int mlx5e_rep_get_sset_count(struct net_device *dev, int sset)
|
|||
}
|
||||
}
|
||||
|
||||
static void mlx5e_rep_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
static void
|
||||
mlx5e_rep_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx5e_priv *priv = netdev_priv(dev);
|
||||
|
||||
mlx5e_ethtool_get_ringparam(priv, param);
|
||||
}
|
||||
|
||||
static int mlx5e_rep_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
static int
|
||||
mlx5e_rep_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx5e_priv *priv = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -67,7 +67,9 @@ static void mlx5i_get_ethtool_stats(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int mlx5i_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx5e_priv *priv = mlx5i_epriv(dev);
|
||||
|
||||
|
@ -75,7 +77,9 @@ static int mlx5i_set_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void mlx5i_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlx5e_priv *priv = mlx5i_epriv(dev);
|
||||
|
||||
|
|
|
@ -6395,12 +6395,16 @@ static int netdev_set_pauseparam(struct net_device *dev,
|
|||
/**
|
||||
* netdev_get_ringparam - get tx/rx ring parameters
|
||||
* @dev: Network device.
|
||||
* @pause: Ethtool RING settings data structure.
|
||||
* @ring: Ethtool RING settings data structure.
|
||||
* @kernel_ring: Ethtool external RING settings data structure.
|
||||
* @extack: Netlink handle.
|
||||
*
|
||||
* This procedure returns the TX/RX ring settings.
|
||||
*/
|
||||
static void netdev_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct dev_priv *priv = netdev_priv(dev);
|
||||
struct dev_info *hw_priv = priv->adapter;
|
||||
|
|
|
@ -1714,7 +1714,9 @@ myri10ge_set_pauseparam(struct net_device *netdev,
|
|||
|
||||
static void
|
||||
myri10ge_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct myri10ge_priv *mgp = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -5449,8 +5449,11 @@ static int s2io_ethtool_set_led(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void s2io_ethtool_gringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static void
|
||||
s2io_ethtool_gringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct s2io_nic *sp = netdev_priv(dev);
|
||||
int i, tx_desc_count = 0, rx_desc_count = 0;
|
||||
|
|
|
@ -360,7 +360,9 @@ err_bad_set:
|
|||
}
|
||||
|
||||
static void nfp_net_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct nfp_net *nn = netdev_priv(netdev);
|
||||
|
||||
|
@ -385,7 +387,9 @@ static int nfp_net_set_ring_size(struct nfp_net *nn, u32 rxd_cnt, u32 txd_cnt)
|
|||
}
|
||||
|
||||
static int nfp_net_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct nfp_net *nn = netdev_priv(netdev);
|
||||
u32 rxd_cnt, txd_cnt;
|
||||
|
|
|
@ -4617,7 +4617,10 @@ static int nv_nway_reset(struct net_device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void nv_get_ringparam(struct net_device *dev, struct ethtool_ringparam* ring)
|
||||
static void nv_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct fe_priv *np = netdev_priv(dev);
|
||||
|
||||
|
@ -4628,7 +4631,10 @@ static void nv_get_ringparam(struct net_device *dev, struct ethtool_ringparam* r
|
|||
ring->tx_pending = np->tx_ring_size;
|
||||
}
|
||||
|
||||
static int nv_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ring)
|
||||
static int nv_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct fe_priv *np = netdev_priv(dev);
|
||||
u8 __iomem *base = get_hwbase(dev);
|
||||
|
|
|
@ -268,9 +268,13 @@ static int pch_gbe_nway_reset(struct net_device *netdev)
|
|||
* pch_gbe_get_ringparam - Report ring sizes
|
||||
* @netdev: Network interface device structure
|
||||
* @ring: Ring param structure
|
||||
* @kernel_ring: Ring external param structure
|
||||
* @extack: netlink handle
|
||||
*/
|
||||
static void pch_gbe_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct pch_gbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct pch_gbe_tx_ring *txdr = adapter->tx_ring;
|
||||
|
@ -286,12 +290,16 @@ static void pch_gbe_get_ringparam(struct net_device *netdev,
|
|||
* pch_gbe_set_ringparam - Set ring sizes
|
||||
* @netdev: Network interface device structure
|
||||
* @ring: Ring param structure
|
||||
* @kernel_ring: Ring external param structure
|
||||
* @extack: netlink handle
|
||||
* Returns
|
||||
* 0: Successful.
|
||||
* Negative value: Failed.
|
||||
*/
|
||||
static int pch_gbe_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct pch_gbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct pch_gbe_tx_ring *txdr, *tx_old;
|
||||
|
|
|
@ -69,7 +69,9 @@ pasemi_mac_ethtool_set_msglevel(struct net_device *netdev,
|
|||
|
||||
static void
|
||||
pasemi_mac_ethtool_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct pasemi_mac *mac = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -450,7 +450,9 @@ static int ionic_set_coalesce(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void ionic_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ionic_lif *lif = netdev_priv(netdev);
|
||||
|
||||
|
@ -461,7 +463,9 @@ static void ionic_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int ionic_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ionic_lif *lif = netdev_priv(netdev);
|
||||
bool running;
|
||||
|
|
|
@ -392,7 +392,9 @@ netxen_nic_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
|
|||
|
||||
static void
|
||||
netxen_nic_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct netxen_adapter *adapter = netdev_priv(dev);
|
||||
|
||||
|
@ -430,7 +432,9 @@ netxen_validate_ringparam(u32 val, u32 min, u32 max, char *r_name)
|
|||
|
||||
static int
|
||||
netxen_nic_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct netxen_adapter *adapter = netdev_priv(dev);
|
||||
u16 max_rcv_desc = MAX_RCV_DESCRIPTORS_10G;
|
||||
|
|
|
@ -932,7 +932,9 @@ static int qede_set_coalesce(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void qede_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qede_dev *edev = netdev_priv(dev);
|
||||
|
||||
|
@ -943,7 +945,9 @@ static void qede_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int qede_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qede_dev *edev = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -633,7 +633,9 @@ qlcnic_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
|
|||
|
||||
static void
|
||||
qlcnic_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qlcnic_adapter *adapter = netdev_priv(dev);
|
||||
|
||||
|
@ -664,7 +666,9 @@ qlcnic_validate_ringparam(u32 val, u32 min, u32 max, char *r_name)
|
|||
|
||||
static int
|
||||
qlcnic_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qlcnic_adapter *adapter = netdev_priv(dev);
|
||||
u16 num_rxd, num_jumbo_rxd, num_txd;
|
||||
|
|
|
@ -133,7 +133,9 @@ static int emac_nway_reset(struct net_device *netdev)
|
|||
}
|
||||
|
||||
static void emac_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct emac_adapter *adpt = netdev_priv(netdev);
|
||||
|
||||
|
@ -144,7 +146,9 @@ static void emac_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int emac_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct emac_adapter *adpt = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -245,7 +245,9 @@ qcaspi_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
|
|||
}
|
||||
|
||||
static void
|
||||
qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
|
||||
qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qcaspi *qca = netdev_priv(dev);
|
||||
|
||||
|
@ -256,7 +258,9 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
|
|||
}
|
||||
|
||||
static int
|
||||
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
|
||||
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
const struct net_device_ops *ops = dev->netdev_ops;
|
||||
struct qcaspi *qca = netdev_priv(dev);
|
||||
|
|
|
@ -1388,7 +1388,9 @@ static void cp_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *info
|
|||
}
|
||||
|
||||
static void cp_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
ring->rx_max_pending = CP_RX_RING_SIZE;
|
||||
ring->tx_max_pending = CP_TX_RING_SIZE;
|
||||
|
|
|
@ -1179,7 +1179,9 @@ static void ravb_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
|
|||
}
|
||||
|
||||
static void ravb_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
|
||||
|
@ -1190,7 +1192,9 @@ static void ravb_get_ringparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
static int ravb_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ravb_private *priv = netdev_priv(ndev);
|
||||
int error;
|
||||
|
|
|
@ -2329,7 +2329,9 @@ static void sh_eth_get_strings(struct net_device *ndev, u32 stringset, u8 *data)
|
|||
}
|
||||
|
||||
static void sh_eth_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
|
||||
|
@ -2340,7 +2342,9 @@ static void sh_eth_get_ringparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
static int sh_eth_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct sh_eth_private *mdp = netdev_priv(ndev);
|
||||
int ret;
|
||||
|
|
|
@ -656,8 +656,11 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void efx_ethtool_get_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static void
|
||||
efx_ethtool_get_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct efx_nic *efx = netdev_priv(net_dev);
|
||||
|
||||
|
@ -667,8 +670,11 @@ static void efx_ethtool_get_ringparam(struct net_device *net_dev,
|
|||
ring->tx_pending = efx->txq_entries;
|
||||
}
|
||||
|
||||
static int efx_ethtool_set_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static int
|
||||
efx_ethtool_set_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct efx_nic *efx = netdev_priv(net_dev);
|
||||
u32 txq_entries;
|
||||
|
|
|
@ -640,8 +640,11 @@ static int ef4_ethtool_set_coalesce(struct net_device *net_dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void ef4_ethtool_get_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static void
|
||||
ef4_ethtool_get_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ef4_nic *efx = netdev_priv(net_dev);
|
||||
|
||||
|
@ -651,8 +654,11 @@ static void ef4_ethtool_get_ringparam(struct net_device *net_dev,
|
|||
ring->tx_pending = efx->txq_entries;
|
||||
}
|
||||
|
||||
static int ef4_ethtool_set_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
static int
|
||||
ef4_ethtool_set_ringparam(struct net_device *net_dev,
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ef4_nic *efx = netdev_priv(net_dev);
|
||||
u32 txq_entries;
|
||||
|
|
|
@ -2259,9 +2259,13 @@ static inline int bdx_tx_fifo_size_to_packets(int tx_size)
|
|||
* bdx_get_ringparam - report ring sizes
|
||||
* @netdev
|
||||
* @ring
|
||||
* @kernel_ring
|
||||
* @extack
|
||||
*/
|
||||
static void
|
||||
bdx_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
||||
bdx_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bdx_priv *priv = netdev_priv(netdev);
|
||||
|
||||
|
@ -2276,9 +2280,13 @@ bdx_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
|||
* bdx_set_ringparam - set ring sizes
|
||||
* @netdev
|
||||
* @ring
|
||||
* @kernel_ring
|
||||
* @extack
|
||||
*/
|
||||
static int
|
||||
bdx_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
|
||||
bdx_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct bdx_priv *priv = netdev_priv(netdev);
|
||||
int rx_size = 0;
|
||||
|
|
|
@ -827,7 +827,9 @@ static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||
}
|
||||
|
||||
static void cpmac_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct cpmac_priv *priv = netdev_priv(dev);
|
||||
|
||||
|
@ -843,7 +845,9 @@ static void cpmac_get_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int cpmac_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct cpmac_priv *priv = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -657,7 +657,9 @@ err:
|
|||
}
|
||||
|
||||
void cpsw_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct cpsw_priv *priv = netdev_priv(ndev);
|
||||
struct cpsw_common *cpsw = priv->cpsw;
|
||||
|
@ -670,7 +672,9 @@ void cpsw_get_ringparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
int cpsw_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
|
||||
int descs_num, ret;
|
||||
|
|
|
@ -430,9 +430,13 @@ int cpsw_get_eee(struct net_device *ndev, struct ethtool_eee *edata);
|
|||
int cpsw_set_eee(struct net_device *ndev, struct ethtool_eee *edata);
|
||||
int cpsw_nway_reset(struct net_device *ndev);
|
||||
void cpsw_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering);
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack);
|
||||
int cpsw_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering);
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack);
|
||||
int cpsw_set_channels_common(struct net_device *ndev,
|
||||
struct ethtool_channels *chs,
|
||||
cpdma_handler_fn rx_handler);
|
||||
|
|
|
@ -110,7 +110,9 @@ spider_net_ethtool_nway_reset(struct net_device *netdev)
|
|||
|
||||
static void
|
||||
spider_net_ethtool_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ering)
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct spider_net_card *card = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -1201,8 +1201,11 @@ static void axienet_ethtools_get_regs(struct net_device *ndev,
|
|||
data[39] = axienet_dma_in32(lp, XAXIDMA_RX_TDESC_OFFSET);
|
||||
}
|
||||
|
||||
static void axienet_ethtools_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static void
|
||||
axienet_ethtools_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct axienet_local *lp = netdev_priv(ndev);
|
||||
|
||||
|
@ -1216,8 +1219,11 @@ static void axienet_ethtools_get_ringparam(struct net_device *ndev,
|
|||
ering->tx_pending = lp->tx_bd_num;
|
||||
}
|
||||
|
||||
static int axienet_ethtools_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering)
|
||||
static int
|
||||
axienet_ethtools_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ering,
|
||||
struct kernel_ethtool_ringparam *kernel_ering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct axienet_local *lp = netdev_priv(ndev);
|
||||
|
||||
|
|
|
@ -1728,7 +1728,9 @@ static void __netvsc_get_ringparam(struct netvsc_device *nvdev,
|
|||
}
|
||||
|
||||
static void netvsc_get_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct net_device_context *ndevctx = netdev_priv(ndev);
|
||||
struct netvsc_device *nvdev = rtnl_dereference(ndevctx->nvdev);
|
||||
|
@ -1740,7 +1742,9 @@ static void netvsc_get_ringparam(struct net_device *ndev,
|
|||
}
|
||||
|
||||
static int netvsc_set_ringparam(struct net_device *ndev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct net_device_context *ndevctx = netdev_priv(ndev);
|
||||
struct netvsc_device *nvdev = rtnl_dereference(ndevctx->nvdev);
|
||||
|
|
|
@ -5320,7 +5320,9 @@ static int rtl8152_set_tunable(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static void rtl8152_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct r8152 *tp = netdev_priv(netdev);
|
||||
|
||||
|
@ -5329,7 +5331,9 @@ static void rtl8152_get_ringparam(struct net_device *netdev,
|
|||
}
|
||||
|
||||
static int rtl8152_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct r8152 *tp = netdev_priv(netdev);
|
||||
|
||||
|
|
|
@ -2143,7 +2143,9 @@ static void virtnet_cpu_notif_remove(struct virtnet_info *vi)
|
|||
}
|
||||
|
||||
static void virtnet_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ring)
|
||||
struct ethtool_ringparam *ring,
|
||||
struct kernel_ethtool_ringparam *kernel_ring,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct virtnet_info *vi = netdev_priv(dev);
|
||||
|
||||
|
|
|
@ -504,10 +504,11 @@ vmxnet3_get_link_ksettings(struct net_device *netdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
vmxnet3_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct vmxnet3_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
|
@ -524,10 +525,11 @@ vmxnet3_get_ringparam(struct net_device *netdev,
|
|||
param->rx_jumbo_pending = adapter->rx_ring2_size;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
vmxnet3_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct vmxnet3_adapter *adapter = netdev_priv(netdev);
|
||||
u32 new_tx_ring_size, new_rx_ring_size, new_rx_ring2_size;
|
||||
|
|
|
@ -106,7 +106,9 @@ static void qeth_get_ethtool_stats(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void qeth_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *param)
|
||||
struct ethtool_ringparam *param,
|
||||
struct kernel_ethtool_ringparam *kernel_param,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qeth_card *card = dev->ml_priv;
|
||||
|
||||
|
|
|
@ -462,9 +462,13 @@ struct ethtool_ops {
|
|||
struct kernel_ethtool_coalesce *,
|
||||
struct netlink_ext_ack *);
|
||||
void (*get_ringparam)(struct net_device *,
|
||||
struct ethtool_ringparam *);
|
||||
struct ethtool_ringparam *,
|
||||
struct kernel_ethtool_ringparam *,
|
||||
struct netlink_ext_ack *);
|
||||
int (*set_ringparam)(struct net_device *,
|
||||
struct ethtool_ringparam *);
|
||||
struct ethtool_ringparam *,
|
||||
struct kernel_ethtool_ringparam *,
|
||||
struct netlink_ext_ack *);
|
||||
void (*get_pause_stats)(struct net_device *dev,
|
||||
struct ethtool_pause_stats *pause_stats);
|
||||
void (*get_pauseparam)(struct net_device *,
|
||||
|
|
|
@ -1577,11 +1577,13 @@ static noinline_for_stack int ethtool_set_coalesce(struct net_device *dev,
|
|||
static int ethtool_get_ringparam(struct net_device *dev, void __user *useraddr)
|
||||
{
|
||||
struct ethtool_ringparam ringparam = { .cmd = ETHTOOL_GRINGPARAM };
|
||||
struct kernel_ethtool_ringparam kernel_ringparam = {};
|
||||
|
||||
if (!dev->ethtool_ops->get_ringparam)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
dev->ethtool_ops->get_ringparam(dev, &ringparam);
|
||||
dev->ethtool_ops->get_ringparam(dev, &ringparam,
|
||||
&kernel_ringparam, NULL);
|
||||
|
||||
if (copy_to_user(useraddr, &ringparam, sizeof(ringparam)))
|
||||
return -EFAULT;
|
||||
|
@ -1591,6 +1593,7 @@ static int ethtool_get_ringparam(struct net_device *dev, void __user *useraddr)
|
|||
static int ethtool_set_ringparam(struct net_device *dev, void __user *useraddr)
|
||||
{
|
||||
struct ethtool_ringparam ringparam, max = { .cmd = ETHTOOL_GRINGPARAM };
|
||||
struct kernel_ethtool_ringparam kernel_ringparam;
|
||||
int ret;
|
||||
|
||||
if (!dev->ethtool_ops->set_ringparam || !dev->ethtool_ops->get_ringparam)
|
||||
|
@ -1599,7 +1602,7 @@ static int ethtool_set_ringparam(struct net_device *dev, void __user *useraddr)
|
|||
if (copy_from_user(&ringparam, useraddr, sizeof(ringparam)))
|
||||
return -EFAULT;
|
||||
|
||||
dev->ethtool_ops->get_ringparam(dev, &max);
|
||||
dev->ethtool_ops->get_ringparam(dev, &max, &kernel_ringparam, NULL);
|
||||
|
||||
/* ensure new ring parameters are within the maximums */
|
||||
if (ringparam.rx_pending > max.rx_max_pending ||
|
||||
|
@ -1608,7 +1611,8 @@ static int ethtool_set_ringparam(struct net_device *dev, void __user *useraddr)
|
|||
ringparam.tx_pending > max.tx_max_pending)
|
||||
return -EINVAL;
|
||||
|
||||
ret = dev->ethtool_ops->set_ringparam(dev, &ringparam);
|
||||
ret = dev->ethtool_ops->set_ringparam(dev, &ringparam,
|
||||
&kernel_ringparam, NULL);
|
||||
if (!ret)
|
||||
ethtool_notify(dev, ETHTOOL_MSG_RINGS_NTF, NULL);
|
||||
return ret;
|
||||
|
|
|
@ -35,6 +35,7 @@ static int rings_prepare_data(const struct ethnl_req_info *req_base,
|
|||
struct genl_info *info)
|
||||
{
|
||||
struct rings_reply_data *data = RINGS_REPDATA(reply_base);
|
||||
struct netlink_ext_ack *extack = info ? info->extack : NULL;
|
||||
struct net_device *dev = reply_base->dev;
|
||||
int ret;
|
||||
|
||||
|
@ -43,7 +44,8 @@ static int rings_prepare_data(const struct ethnl_req_info *req_base,
|
|||
ret = ethnl_ops_begin(dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
dev->ethtool_ops->get_ringparam(dev, &data->ringparam);
|
||||
dev->ethtool_ops->get_ringparam(dev, &data->ringparam,
|
||||
&data->kernel_ringparam, extack);
|
||||
ethnl_ops_complete(dev);
|
||||
|
||||
return 0;
|
||||
|
@ -163,7 +165,7 @@ int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info)
|
|||
ret = ethnl_ops_begin(dev);
|
||||
if (ret < 0)
|
||||
goto out_rtnl;
|
||||
ops->get_ringparam(dev, &ringparam);
|
||||
ops->get_ringparam(dev, &ringparam, &kernel_ringparam, info->extack);
|
||||
|
||||
ethnl_update_u32(&ringparam.rx_pending, tb[ETHTOOL_A_RINGS_RX], &mod);
|
||||
ethnl_update_u32(&ringparam.rx_mini_pending,
|
||||
|
@ -204,7 +206,8 @@ int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info)
|
|||
goto out_ops;
|
||||
}
|
||||
|
||||
ret = dev->ethtool_ops->set_ringparam(dev, &ringparam);
|
||||
ret = dev->ethtool_ops->set_ringparam(dev, &ringparam,
|
||||
&kernel_ringparam, info->extack);
|
||||
if (ret < 0)
|
||||
goto out_ops;
|
||||
ethtool_notify(dev, ETHTOOL_MSG_RINGS_NTF, NULL);
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
#include "driver-ops.h"
|
||||
|
||||
static int ieee80211_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *rp)
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(dev->ieee80211_ptr->wiphy);
|
||||
|
||||
|
@ -25,7 +27,9 @@ static int ieee80211_set_ringparam(struct net_device *dev,
|
|||
}
|
||||
|
||||
static void ieee80211_get_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *rp)
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(dev->ieee80211_ptr->wiphy);
|
||||
|
||||
|
|
Loading…
Reference in New Issue