enic: remove copybreak tunable
authorJohn Daley <johndale@cisco.com>
Wed, 5 Feb 2025 23:54:16 +0000 (15:54 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Feb 2025 01:17:02 +0000 (17:17 -0800)
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>
drivers/net/ethernet/cisco/enic/enic.h
drivers/net/ethernet/cisco/enic/enic_ethtool.c
drivers/net/ethernet/cisco/enic/enic_main.c

index 2ccf2d2a77dbb4ef9f07ccdb09dcc4f893031259..305ed12aa0311ca6cc53bfbffcc300182a8011a7 100644 (file)
@@ -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;
 };
index d607b4f0542ceaef09e9528a591ca27177986143..18b929fc2879912ad09025996a4f1b9fdb353961 100644 (file)
@@ -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,
index 447c54dcd89b52dc9abcf0f82b1dafa422fef22f..f24fd29ea2071f88b3fa79e7768238a24384970e 100644 (file)
@@ -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;