netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmed Zaki <ahmed.zaki@intel.com>
To: Petr Oros <poros@redhat.com>, <netdev@vger.kernel.org>
Cc: <ivecera@redhat.com>, <intel-wired-lan@lists.osuosl.org>,
	<jesse.brandeburg@intel.com>, <linux-kernel@vger.kernel.org>,
	<edumazet@google.com>, <anthony.l.nguyen@intel.com>,
	<kuba@kernel.org>, <pabeni@redhat.com>, <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH net 1/2] iavf: add iavf_schedule_aq_request() helper
Date: Wed, 6 Sep 2023 09:32:59 -0600	[thread overview]
Message-ID: <bbb51ddd-ceb1-63a8-a06a-f365da5ac4b7@intel.com> (raw)
In-Reply-To: <20230906141411.121142-1-poros@redhat.com>


On 2023-09-06 08:14, Petr Oros wrote:
> Add helper for set iavf aq request AVF_FLAG_AQ_* and imediately
> 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>
> ---
>   drivers/net/ethernet/intel/iavf/iavf.h         |  2 +-
>   drivers/net/ethernet/intel/iavf/iavf_ethtool.c |  2 +-
>   drivers/net/ethernet/intel/iavf/iavf_main.c    | 10 ++++------
>   3 files changed, 6 insertions(+), 8 deletions(-)
>
> 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);
>   }
>   

There are other places where the helper can be used without functional 
changes, e.g. iavf_add_fdir_ethtool() , iavf_replace_primary_mac() and 
couple of other places. In all of them, mod_delayed_work() is called 
after setting the AQ flag. For the sake of consistency, can you use the 
helper there too?


Thanks,

Ahmed


  parent reply	other threads:[~2023-09-06 15:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 14:14 [PATCH net 1/2] iavf: add iavf_schedule_aq_request() helper Petr Oros
2023-09-06 14:14 ` [PATCH net 2/2] iavf: schedule a request immediately after add/delete vlan Petr Oros
2023-09-06 15:33   ` [Intel-wired-lan] " Ahmed Zaki
2023-09-06 15:32 ` Ahmed Zaki [this message]
2023-09-06 16:44   ` [Intel-wired-lan] [PATCH net 1/2] iavf: add iavf_schedule_aq_request() helper Simon Horman
2023-09-07  7:01   ` Petr Oros
2023-09-07 12:42     ` Ahmed Zaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bbb51ddd-ceb1-63a8-a06a-f365da5ac4b7@intel.com \
    --to=ahmed.zaki@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=ivecera@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).