mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
enic: remove copybreak tunable
With the move to using the Page Pool API for RX, rx copybreak was not showing any improvement in host CPU overhead, latency or bandwidth so the driver no longer makes use of the rx_copybreak setting. This patch removes the ethtool tuneable hooks to set and get the rx copybreak since they and now no-ops. Rx copybreak was the only tunable supported, so remove the set and get tunable callbacks all together. Co-developed-by: Nelson Escobar <neescoba@cisco.com> Signed-off-by: Nelson Escobar <neescoba@cisco.com> Co-developed-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: Satish Kharat <satishkh@cisco.com> Signed-off-by: John Daley <johndale@cisco.com> Link: https://patch.msgid.link/20250205235416.25410-5-johndale@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
d24cb52b2d
commit
a3b2caaede
@@ -226,7 +226,6 @@ struct enic {
|
||||
unsigned int cq_avail;
|
||||
unsigned int cq_count;
|
||||
struct enic_rfs_flw_tbl rfs_h;
|
||||
u32 rx_copybreak;
|
||||
u8 rss_key[ENIC_RSS_LEN];
|
||||
struct vnic_gen_stats gen_stats;
|
||||
};
|
||||
|
||||
@@ -608,43 +608,6 @@ static int enic_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int enic_get_tunable(struct net_device *dev,
|
||||
const struct ethtool_tunable *tuna, void *data)
|
||||
{
|
||||
struct enic *enic = netdev_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
switch (tuna->id) {
|
||||
case ETHTOOL_RX_COPYBREAK:
|
||||
*(u32 *)data = enic->rx_copybreak;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int enic_set_tunable(struct net_device *dev,
|
||||
const struct ethtool_tunable *tuna,
|
||||
const void *data)
|
||||
{
|
||||
struct enic *enic = netdev_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
switch (tuna->id) {
|
||||
case ETHTOOL_RX_COPYBREAK:
|
||||
enic->rx_copybreak = *(u32 *)data;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 enic_get_rxfh_key_size(struct net_device *netdev)
|
||||
{
|
||||
return ENIC_RSS_LEN;
|
||||
@@ -727,8 +690,6 @@ static const struct ethtool_ops enic_ethtool_ops = {
|
||||
.get_coalesce = enic_get_coalesce,
|
||||
.set_coalesce = enic_set_coalesce,
|
||||
.get_rxnfc = enic_get_rxnfc,
|
||||
.get_tunable = enic_get_tunable,
|
||||
.set_tunable = enic_set_tunable,
|
||||
.get_rxfh_key_size = enic_get_rxfh_key_size,
|
||||
.get_rxfh = enic_get_rxfh,
|
||||
.set_rxfh = enic_set_rxfh,
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
#define PCI_DEVICE_ID_CISCO_VIC_ENET_DYN 0x0044 /* enet dynamic vnic */
|
||||
#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF 0x0071 /* enet SRIOV VF */
|
||||
|
||||
#define RX_COPYBREAK_DEFAULT 256
|
||||
|
||||
/* Supported devices */
|
||||
static const struct pci_device_id enic_id_table[] = {
|
||||
{ PCI_VDEVICE(CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) },
|
||||
@@ -2972,7 +2970,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
dev_err(dev, "Cannot register net device, aborting\n");
|
||||
goto err_out_dev_deinit;
|
||||
}
|
||||
enic->rx_copybreak = RX_COPYBREAK_DEFAULT;
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user