Message ID | 20230907150251.224931-1-poros@redhat.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2,1/2] iavf: add iavf_schedule_aq_request() helper | expand |
On Thu, Sep 07, 2023 at 05:02:50PM +0200, Petr Oros wrote: > Add helper for set iavf aq request AVF_FLAG_AQ_* and immediately > schedule watchdog_task. Helper will be used in cases where it is > necessary to run aq requests asap > > Signed-off-by: Petr Oros <poros@redhat.com> > Co-developed-by: Michal Schmidt <mschmidt@redhat.com> > Signed-off-by: Michal Schmidt <mschmidt@redhat.com> > Co-developed-by: Ivan Vecera <ivecera@redhat.com> > Signed-off-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org>
On Thu, Sep 07, 2023 at 05:02:51PM +0200, Petr Oros wrote: > When the iavf driver wants to reconfigure the VLAN filters > (iavf_add_vlan, iavf_del_vlan), it sets a flag in > aq_required: > adapter->aq_required |= IAVF_FLAG_AQ_ADD_VLAN_FILTER; > or: > adapter->aq_required |= IAVF_FLAG_AQ_DEL_VLAN_FILTER; > > This is later processed by the watchdog_task, but it runs periodically > every 2 seconds, so it can be a long time before it processes the request. > > In the worst case, the interface is unable to receive traffic for more > than 2 seconds for no objective reason. > > Signed-off-by: Petr Oros <poros@redhat.com> > Co-developed-by: Michal Schmidt <mschmidt@redhat.com> > Signed-off-by: Michal Schmidt <mschmidt@redhat.com> > Co-developed-by: Ivan Vecera <ivecera@redhat.com> > Signed-off-by: Ivan Vecera <ivecera@redhat.com> > Reviewed-by: Ahmed Zaki <ahmed.zaki@intel.com> Reviewed-by: Simon Horman <horms@kernel.org>
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Simon Horman > Sent: Thursday, September 7, 2023 5:31 PM > To: poros <poros@redhat.com> > Cc: ivecera <ivecera@redhat.com>; netdev@vger.kernel.org; Brandeburg, > Jesse <jesse.brandeburg@intel.com>; linux-kernel@vger.kernel.org; > edumazet@google.com; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; > intel-wired-lan@lists.osuosl.org; kuba@kernel.org; pabeni@redhat.com; > davem@davemloft.net > Subject: Re: [Intel-wired-lan] [PATCH net v2 1/2] iavf: add > iavf_schedule_aq_request() helper > > On Thu, Sep 07, 2023 at 05:02:50PM +0200, Petr Oros wrote: > > Add helper for set iavf aq request AVF_FLAG_AQ_* and immediately > > schedule watchdog_task. Helper will be used in cases where it is > > necessary to run aq requests asap > > > > Signed-off-by: Petr Oros <poros@redhat.com> > > Co-developed-by: Michal Schmidt <mschmidt@redhat.com> > > Signed-off-by: Michal Schmidt <mschmidt@redhat.com> > > Co-developed-by: Ivan Vecera <ivecera@redhat.com> > > Signed-off-by: Ivan Vecera <ivecera@redhat.com> > > Reviewed-by: Simon Horman <horms@kernel.org> > > _______________________________________________ > Intel-wired-lan mailing list > Intel-wired-lan@osuosl.org > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h index 85fba85fbb232b..e110ba3461857b 100644 --- a/drivers/net/ethernet/intel/iavf/iavf.h +++ b/drivers/net/ethernet/intel/iavf/iavf.h @@ -521,7 +521,7 @@ void iavf_down(struct iavf_adapter *adapter); int iavf_process_config(struct iavf_adapter *adapter); int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter); void iavf_schedule_reset(struct iavf_adapter *adapter, u64 flags); -void iavf_schedule_request_stats(struct iavf_adapter *adapter); +void iavf_schedule_aq_request(struct iavf_adapter *adapter, u64 flags); void iavf_schedule_finish_config(struct iavf_adapter *adapter); void iavf_reset(struct iavf_adapter *adapter); void iavf_set_ethtool_ops(struct net_device *netdev); diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c index a34303ad057d00..90397293525f71 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c +++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c @@ -362,7 +362,7 @@ static void iavf_get_ethtool_stats(struct net_device *netdev, unsigned int i; /* Explicitly request stats refresh */ - iavf_schedule_request_stats(adapter); + iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_REQUEST_STATS); iavf_add_ethtool_stats(&data, adapter, iavf_gstrings_stats); diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 7b300c86ceda73..86d472dfdbc10c 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -314,15 +314,13 @@ void iavf_schedule_reset(struct iavf_adapter *adapter, u64 flags) } /** - * iavf_schedule_request_stats - Set the flags and schedule statistics request + * iavf_schedule_aq_request - Set the flags and schedule aq request * @adapter: board private structure - * - * Sets IAVF_FLAG_AQ_REQUEST_STATS flag so iavf_watchdog_task() will explicitly - * request and refresh ethtool stats + * @flags: requested aq flags **/ -void iavf_schedule_request_stats(struct iavf_adapter *adapter) +void iavf_schedule_aq_request(struct iavf_adapter *adapter, u64 flags) { - adapter->aq_required |= IAVF_FLAG_AQ_REQUEST_STATS; + adapter->aq_required |= flags; mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0); }