[07/37] net/ice/base: declare functions as external

Message ID 20190228055650.25237-8-qi.z.zhang@intel.com
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • share code update.
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z Feb. 28, 2019, 5:56 a.m.
Remove static of below functions and declare them as external
APIs.

ice_aq_add_vsi
ice_aq_free_vsi
ice_aq_update_vsi
ice_aq_add_lan_txq
ice_init_pkg

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_common.c    | 2 +-
 drivers/net/ice/base/ice_common.h    | 4 ++++
 drivers/net/ice/base/ice_flex_pipe.c | 2 +-
 drivers/net/ice/base/ice_flex_pipe.h | 2 ++
 drivers/net/ice/base/ice_switch.c    | 6 +++---
 drivers/net/ice/base/ice_switch.h    | 9 +++++++++
 6 files changed, 20 insertions(+), 5 deletions(-)

Comments

Ferruh Yigit March 1, 2019, 10:30 a.m. | #1
On 2/28/2019 5:56 AM, Qi Zhang wrote:
> Remove static of below functions and declare them as external
> APIs.
> 
> ice_aq_add_vsi
> ice_aq_free_vsi
> ice_aq_update_vsi
> ice_aq_add_lan_txq
> ice_init_pkg

Hi Qi,

This is generic comment for the patchset but it is easy to demonstrate in this
patch,

Patch title and comment describes what is done in the code, which is exactly
same with what can be seen from the code, so doesn't add more value.

What can't be seen from the below code is "why you need this change?" and "what
is the impact of the change?".

Can you please update the patch title to describe what is achieved by the patch
but not implementation details.
Also in commit log describe "why it is needed" and "what will be the impact, or
impact of not having this change", and of course if the implementation is
complex describe the implementation too.


And specific to this patch, this is base code update, most probably it is
setting ground to enable some features in driver, wouldn't it be better to do
these changes when the relevant driver change done? It sets the context for the
update and it helps to review the patch.
Right now it just exposes some APIs without really knowing who will use them, or
will anybody use them at all.

> 
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/base/ice_common.c    | 2 +-
>  drivers/net/ice/base/ice_common.h    | 4 ++++
>  drivers/net/ice/base/ice_flex_pipe.c | 2 +-
>  drivers/net/ice/base/ice_flex_pipe.h | 2 ++
>  drivers/net/ice/base/ice_switch.c    | 6 +++---
>  drivers/net/ice/base/ice_switch.h    | 9 +++++++++
>  6 files changed, 20 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
> index 86d3be17a..015db11e0 100644
> --- a/drivers/net/ice/base/ice_common.c
> +++ b/drivers/net/ice/base/ice_common.c
> @@ -2935,7 +2935,7 @@ ice_aq_set_rss_key(struct ice_hw *hw, u16 vsi_handle,
>   * Association of Tx queue to Doorbell queue is not part of Add LAN Tx queue
>   * flow.
>   */
> -static enum ice_status
> +enum ice_status
>  ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps,
>  		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
>  		   struct ice_sq_cd *cd)
> diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h
> index 0b387cdbe..63f4a5ebe 100644
> --- a/drivers/net/ice/base/ice_common.h
> +++ b/drivers/net/ice/base/ice_common.h
> @@ -94,6 +94,10 @@ ice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle,
>  enum ice_status
>  ice_aq_set_rss_key(struct ice_hw *hw, u16 vsi_handle,
>  		   struct ice_aqc_get_set_rss_keys *keys);
> +enum ice_status
> +ice_aq_add_lan_txq(struct ice_hw *hw, u8 count,
> +		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
> +		   struct ice_sq_cd *cd);
>  
>  bool ice_check_sq_alive(struct ice_hw *hw, struct ice_ctl_q_info *cq);
>  enum ice_status ice_aq_q_shutdown(struct ice_hw *hw, bool unloading);
> diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
> index 2d23c36eb..ff615f94f 100644
> --- a/drivers/net/ice/base/ice_flex_pipe.c
> +++ b/drivers/net/ice/base/ice_flex_pipe.c
> @@ -1314,7 +1314,7 @@ static void ice_init_pkg_regs(struct ice_hw *hw)
>   * ice_copy_and_init_pkg() instead of directly calling ice_init_pkg() in this
>   * case.
>   */
> -static enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
> +enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
>  {
>  	struct ice_pkg_hdr *pkg;
>  	enum ice_status status;
> diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
> index 23fffed75..00c2b6682 100644
> --- a/drivers/net/ice/base/ice_flex_pipe.h
> +++ b/drivers/net/ice/base/ice_flex_pipe.h
> @@ -88,6 +88,8 @@ ice_set_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 cntxt);
>  struct ice_prof_map *
>  ice_get_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 *cntxt);
>  enum ice_status
> +ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);
> +enum ice_status
>  ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);
>  enum ice_status ice_init_hw_tbls(struct ice_hw *hw);
>  void ice_free_seg(struct ice_hw *hw);
> diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
> index 512e64b91..e6fc9fcee 100644
> --- a/drivers/net/ice/base/ice_switch.c
> +++ b/drivers/net/ice/base/ice_switch.c
> @@ -288,7 +288,7 @@ enum ice_status ice_free_sw(struct ice_hw *hw, u16 sw_id, u16 counter_id)
>   *
>   * Add a VSI context to the hardware (0x0210)
>   */
> -static enum ice_status
> +enum ice_status
>  ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
>  	       struct ice_sq_cd *cd)
>  {
> @@ -331,7 +331,7 @@ ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
>   *
>   * Free VSI context info from hardware (0x0213)
>   */
> -static enum ice_status
> +enum ice_status
>  ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
>  		bool keep_vsi_alloc, struct ice_sq_cd *cd)
>  {
> @@ -366,7 +366,7 @@ ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
>   *
>   * Update VSI context in the hardware (0x0211)
>   */
> -static enum ice_status
> +enum ice_status
>  ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
>  		  struct ice_sq_cd *cd)
>  {
> diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h
> index 90dfdabcb..b28e55a4f 100644
> --- a/drivers/net/ice/base/ice_switch.h
> +++ b/drivers/net/ice/base/ice_switch.h
> @@ -271,6 +271,15 @@ enum ice_promisc_flags {
>  
>  /* VSI related commands */
>  enum ice_status
> +ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> +	       struct ice_sq_cd *cd);
> +enum ice_status
> +ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> +		bool keep_vsi_alloc, struct ice_sq_cd *cd);
> +enum ice_status
> +ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> +		  struct ice_sq_cd *cd);
> +enum ice_status
>  ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
>  	    struct ice_sq_cd *cd);
>  enum ice_status
>
Zhang, Qi Z March 4, 2019, 7:24 a.m. | #2
Hi Ferruh:

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, March 1, 2019 6:31 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> Yang, Qiming <qiming.yang@intel.com>
> Cc: Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>; dev@dpdk.org
> Subject: Re: [PATCH 07/37] net/ice/base: declare functions as external
> 
> On 2/28/2019 5:56 AM, Qi Zhang wrote:
> > Remove static of below functions and declare them as external APIs.
> >
> > ice_aq_add_vsi
> > ice_aq_free_vsi
> > ice_aq_update_vsi
> > ice_aq_add_lan_txq
> > ice_init_pkg
> 
> Hi Qi,
> 
> This is generic comment for the patchset but it is easy to demonstrate in this
> patch,

OK, I will give generic reply :)
> 
> Patch title and comment describes what is done in the code, which is exactly
> same with what can be seen from the code, so doesn't add more value.
> 
> What can't be seen from the below code is "why you need this change?" and
> "what is the impact of the change?".

Yes, the patch set include a lot changes that impact nothing from user's view.
For examples it adds API not be used in this release but will be used in future.
The reason we do this early is we want to sync with the latest share code that kernel team delivered to DPDK.

And I think this gives below benefits:
1. Generally, stripped the code only we needed from a kernel delivery will take developer more effort compare to just simply sync to a new delivery. (if we take 5000+ ice_flex_pipe.c for example)
2. Exposed some unused share code API early help developers out of Intel to contribute some new features that rely on those APIs and avoid license issue ( they can reference kernel's share code but can't submit the patch with that part of share code)
3. it help us to deliver succinct RFC patch base on an official release for customer for some new feature evaluation.
3. Same benefit for internal develop for some features for new release, it's easy for team to start a code base that include all the share code we needed.

BTW, as I know this is the same way we do on other Intel drivers ( i40e and ixgbe).

>
> Can you please update the patch title to describe what is achieved by the patch
> but not implementation details.
> Also in commit log describe "why it is needed" and "what will be the impact, or
> impact of not having this change", and of course if the implementation is complex
> describe the implementation too.
> 
Yes, I think it's better to add more explanation base on my previous comment.

> 
> And specific to this patch, this is base code update, most probably it is setting
> ground to enable some features in driver, wouldn't it be better to do these
> changes when the relevant driver change done? It sets the context for the
> update and it helps to review the patch.
> Right now it just exposes some APIs without really knowing who will use them, or
> will anybody use them at all.

As I explained above.

Thanks
Qi


> 
> >
> > Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >  drivers/net/ice/base/ice_common.c    | 2 +-
> >  drivers/net/ice/base/ice_common.h    | 4 ++++
> >  drivers/net/ice/base/ice_flex_pipe.c | 2 +-
> > drivers/net/ice/base/ice_flex_pipe.h | 2 ++
> >  drivers/net/ice/base/ice_switch.c    | 6 +++---
> >  drivers/net/ice/base/ice_switch.h    | 9 +++++++++
> >  6 files changed, 20 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/ice/base/ice_common.c
> > b/drivers/net/ice/base/ice_common.c
> > index 86d3be17a..015db11e0 100644
> > --- a/drivers/net/ice/base/ice_common.c
> > +++ b/drivers/net/ice/base/ice_common.c
> > @@ -2935,7 +2935,7 @@ ice_aq_set_rss_key(struct ice_hw *hw, u16
> vsi_handle,
> >   * Association of Tx queue to Doorbell queue is not part of Add LAN Tx queue
> >   * flow.
> >   */
> > -static enum ice_status
> > +enum ice_status
> >  ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps,
> >  		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
> >  		   struct ice_sq_cd *cd)
> > diff --git a/drivers/net/ice/base/ice_common.h
> > b/drivers/net/ice/base/ice_common.h
> > index 0b387cdbe..63f4a5ebe 100644
> > --- a/drivers/net/ice/base/ice_common.h
> > +++ b/drivers/net/ice/base/ice_common.h
> > @@ -94,6 +94,10 @@ ice_aq_get_rss_key(struct ice_hw *hw, u16
> > vsi_handle,  enum ice_status  ice_aq_set_rss_key(struct ice_hw *hw,
> > u16 vsi_handle,
> >  		   struct ice_aqc_get_set_rss_keys *keys);
> > +enum ice_status
> > +ice_aq_add_lan_txq(struct ice_hw *hw, u8 count,
> > +		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
> > +		   struct ice_sq_cd *cd);
> >
> >  bool ice_check_sq_alive(struct ice_hw *hw, struct ice_ctl_q_info
> > *cq);  enum ice_status ice_aq_q_shutdown(struct ice_hw *hw, bool
> > unloading); diff --git a/drivers/net/ice/base/ice_flex_pipe.c
> > b/drivers/net/ice/base/ice_flex_pipe.c
> > index 2d23c36eb..ff615f94f 100644
> > --- a/drivers/net/ice/base/ice_flex_pipe.c
> > +++ b/drivers/net/ice/base/ice_flex_pipe.c
> > @@ -1314,7 +1314,7 @@ static void ice_init_pkg_regs(struct ice_hw *hw)
> >   * ice_copy_and_init_pkg() instead of directly calling ice_init_pkg() in this
> >   * case.
> >   */
> > -static enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32
> > len)
> > +enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
> >  {
> >  	struct ice_pkg_hdr *pkg;
> >  	enum ice_status status;
> > diff --git a/drivers/net/ice/base/ice_flex_pipe.h
> > b/drivers/net/ice/base/ice_flex_pipe.h
> > index 23fffed75..00c2b6682 100644
> > --- a/drivers/net/ice/base/ice_flex_pipe.h
> > +++ b/drivers/net/ice/base/ice_flex_pipe.h
> > @@ -88,6 +88,8 @@ ice_set_prof_context(struct ice_hw *hw, enum
> > ice_block blk, u64 id, u64 cntxt);  struct ice_prof_map *
> > ice_get_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id,
> > u64 *cntxt);  enum ice_status
> > +ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len); enum ice_status
> >  ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);
> > enum ice_status ice_init_hw_tbls(struct ice_hw *hw);  void
> > ice_free_seg(struct ice_hw *hw); diff --git
> > a/drivers/net/ice/base/ice_switch.c
> > b/drivers/net/ice/base/ice_switch.c
> > index 512e64b91..e6fc9fcee 100644
> > --- a/drivers/net/ice/base/ice_switch.c
> > +++ b/drivers/net/ice/base/ice_switch.c
> > @@ -288,7 +288,7 @@ enum ice_status ice_free_sw(struct ice_hw *hw, u16
> sw_id, u16 counter_id)
> >   *
> >   * Add a VSI context to the hardware (0x0210)
> >   */
> > -static enum ice_status
> > +enum ice_status
> >  ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> >  	       struct ice_sq_cd *cd)
> >  {
> > @@ -331,7 +331,7 @@ ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx
> *vsi_ctx,
> >   *
> >   * Free VSI context info from hardware (0x0213)
> >   */
> > -static enum ice_status
> > +enum ice_status
> >  ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> >  		bool keep_vsi_alloc, struct ice_sq_cd *cd)  { @@ -366,7 +366,7 @@
> > ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> >   *
> >   * Update VSI context in the hardware (0x0211)
> >   */
> > -static enum ice_status
> > +enum ice_status
> >  ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> >  		  struct ice_sq_cd *cd)
> >  {
> > diff --git a/drivers/net/ice/base/ice_switch.h
> > b/drivers/net/ice/base/ice_switch.h
> > index 90dfdabcb..b28e55a4f 100644
> > --- a/drivers/net/ice/base/ice_switch.h
> > +++ b/drivers/net/ice/base/ice_switch.h
> > @@ -271,6 +271,15 @@ enum ice_promisc_flags {
> >
> >  /* VSI related commands */
> >  enum ice_status
> > +ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> > +	       struct ice_sq_cd *cd);
> > +enum ice_status
> > +ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> > +		bool keep_vsi_alloc, struct ice_sq_cd *cd); enum ice_status
> > +ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
> > +		  struct ice_sq_cd *cd);
> > +enum ice_status
> >  ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
> >  	    struct ice_sq_cd *cd);
> >  enum ice_status
> >

Patch

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 86d3be17a..015db11e0 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -2935,7 +2935,7 @@  ice_aq_set_rss_key(struct ice_hw *hw, u16 vsi_handle,
  * Association of Tx queue to Doorbell queue is not part of Add LAN Tx queue
  * flow.
  */
-static enum ice_status
+enum ice_status
 ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps,
 		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
 		   struct ice_sq_cd *cd)
diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h
index 0b387cdbe..63f4a5ebe 100644
--- a/drivers/net/ice/base/ice_common.h
+++ b/drivers/net/ice/base/ice_common.h
@@ -94,6 +94,10 @@  ice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle,
 enum ice_status
 ice_aq_set_rss_key(struct ice_hw *hw, u16 vsi_handle,
 		   struct ice_aqc_get_set_rss_keys *keys);
+enum ice_status
+ice_aq_add_lan_txq(struct ice_hw *hw, u8 count,
+		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
+		   struct ice_sq_cd *cd);
 
 bool ice_check_sq_alive(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 enum ice_status ice_aq_q_shutdown(struct ice_hw *hw, bool unloading);
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 2d23c36eb..ff615f94f 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1314,7 +1314,7 @@  static void ice_init_pkg_regs(struct ice_hw *hw)
  * ice_copy_and_init_pkg() instead of directly calling ice_init_pkg() in this
  * case.
  */
-static enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
+enum ice_status ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
 {
 	struct ice_pkg_hdr *pkg;
 	enum ice_status status;
diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
index 23fffed75..00c2b6682 100644
--- a/drivers/net/ice/base/ice_flex_pipe.h
+++ b/drivers/net/ice/base/ice_flex_pipe.h
@@ -88,6 +88,8 @@  ice_set_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 cntxt);
 struct ice_prof_map *
 ice_get_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 *cntxt);
 enum ice_status
+ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);
+enum ice_status
 ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);
 enum ice_status ice_init_hw_tbls(struct ice_hw *hw);
 void ice_free_seg(struct ice_hw *hw);
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 512e64b91..e6fc9fcee 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -288,7 +288,7 @@  enum ice_status ice_free_sw(struct ice_hw *hw, u16 sw_id, u16 counter_id)
  *
  * Add a VSI context to the hardware (0x0210)
  */
-static enum ice_status
+enum ice_status
 ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
 	       struct ice_sq_cd *cd)
 {
@@ -331,7 +331,7 @@  ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
  *
  * Free VSI context info from hardware (0x0213)
  */
-static enum ice_status
+enum ice_status
 ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
 		bool keep_vsi_alloc, struct ice_sq_cd *cd)
 {
@@ -366,7 +366,7 @@  ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
  *
  * Update VSI context in the hardware (0x0211)
  */
-static enum ice_status
+enum ice_status
 ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
 		  struct ice_sq_cd *cd)
 {
diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h
index 90dfdabcb..b28e55a4f 100644
--- a/drivers/net/ice/base/ice_switch.h
+++ b/drivers/net/ice/base/ice_switch.h
@@ -271,6 +271,15 @@  enum ice_promisc_flags {
 
 /* VSI related commands */
 enum ice_status
+ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
+	       struct ice_sq_cd *cd);
+enum ice_status
+ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
+		bool keep_vsi_alloc, struct ice_sq_cd *cd);
+enum ice_status
+ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
+		  struct ice_sq_cd *cd);
+enum ice_status
 ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
 	    struct ice_sq_cd *cd);
 enum ice_status