Message ID | 20241228001055.12707-7-johndale@cisco.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | enic: Use Page Pool API for receiving packets | expand |
On Fri, Dec 27, 2024 at 04:10:55PM -0800, John Daley wrote: > The link speed was being checked before the link was actually up and so > it was always set to 0. Change the adaptive RX coalescing setup function > to run after the Link comes up so that it gets the correct link speed. > > The link speed is used to index a table to get the minimum time for the > range used for adaptive RX. Prior to this fix, the incorrect link speed > would select 0us for the low end of the range regardless of actual link > speed which could cause slightly more interrupts. It still seems like there are two distinct changes here. > diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c > index 21cbd7ed7bda..12678bcf96a6 100644 > --- a/drivers/net/ethernet/cisco/enic/enic_main.c > +++ b/drivers/net/ethernet/cisco/enic/enic_main.c > @@ -109,7 +109,7 @@ static struct enic_intr_mod_table mod_table[ENIC_MAX_COALESCE_TIMERS + 1] = { > static struct enic_intr_mod_range mod_range[ENIC_MAX_LINK_SPEEDS] = { > {0, 0}, /* 0 - 4 Gbps */ > {0, 3}, /* 4 - 10 Gbps */ > - {3, 6}, /* 10 - 40 Gbps */ > + {3, 6}, /* 10+ Gbps */ > }; 1) This fixes a broken comment, but otherwise make no functional change. > static void enic_init_affinity_hint(struct enic *enic) > @@ -466,6 +466,7 @@ static void enic_link_check(struct enic *enic) > if (link_status && !carrier_ok) { > netdev_info(enic->netdev, "Link UP\n"); > netif_carrier_on(enic->netdev); > + enic_set_rx_coal_setting(enic); > } else if (!link_status && carrier_ok) { > netdev_info(enic->netdev, "Link DOWN\n"); > netif_carrier_off(enic->netdev); > @@ -3016,7 +3017,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > timer_setup(&enic->notify_timer, enic_notify_timer, 0); > > enic_rfs_flw_tbl_init(enic); > - enic_set_rx_coal_setting(enic); 2) This sets coalescing after the link is up. Two patches please. Andrew --- pw-bot: cr
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index 21cbd7ed7bda..12678bcf96a6 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -109,7 +109,7 @@ static struct enic_intr_mod_table mod_table[ENIC_MAX_COALESCE_TIMERS + 1] = { static struct enic_intr_mod_range mod_range[ENIC_MAX_LINK_SPEEDS] = { {0, 0}, /* 0 - 4 Gbps */ {0, 3}, /* 4 - 10 Gbps */ - {3, 6}, /* 10 - 40 Gbps */ + {3, 6}, /* 10+ Gbps */ }; static void enic_init_affinity_hint(struct enic *enic) @@ -466,6 +466,7 @@ static void enic_link_check(struct enic *enic) if (link_status && !carrier_ok) { netdev_info(enic->netdev, "Link UP\n"); netif_carrier_on(enic->netdev); + enic_set_rx_coal_setting(enic); } else if (!link_status && carrier_ok) { netdev_info(enic->netdev, "Link DOWN\n"); netif_carrier_off(enic->netdev); @@ -3016,7 +3017,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) timer_setup(&enic->notify_timer, enic_notify_timer, 0); enic_rfs_flw_tbl_init(enic); - enic_set_rx_coal_setting(enic); INIT_WORK(&enic->reset, enic_reset); INIT_WORK(&enic->tx_hang_reset, enic_tx_hang_reset); INIT_WORK(&enic->change_mtu_work, enic_change_mtu_work);