netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com
Cc: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	Grzegorz Nitka <grzegorz.nitka@intel.com>,
	Michal Swiatkowski <michal.swiatkowski@intel.com>,
	Konrad Jankowski <konrad0.jankowski@intel.com>
Subject: [PATCH net 2/4] ice: allow creating VFs for !CONFIG_NET_SWITCHDEV
Date: Thu, 14 Apr 2022 09:15:20 -0700	[thread overview]
Message-ID: <20220414161522.2320694-3-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20220414161522.2320694-1-anthony.l.nguyen@intel.com>

From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Currently for !CONFIG_NET_SWITCHDEV kernel builds it is not possible to
create VFs properly as call to ice_eswitch_configure() returns
-EOPNOTSUPP for us. This is because CONFIG_ICE_SWITCHDEV depends on
CONFIG_NET_SWITCHDEV.

Change the ice_eswitch_configure() implementation for
!CONFIG_ICE_SWITCHDEV to return 0 instead -EOPNOTSUPP and let
ice_ena_vfs() finish its work properly.

CC: Grzegorz Nitka <grzegorz.nitka@intel.com>
Fixes: 1a1c40df2e80 ("ice: set and release switchdev environment")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_eswitch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.h b/drivers/net/ethernet/intel/ice/ice_eswitch.h
index bd58d9d2e565..6a413331572b 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.h
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.h
@@ -52,7 +52,7 @@ static inline void ice_eswitch_update_repr(struct ice_vsi *vsi) { }
 
 static inline int ice_eswitch_configure(struct ice_pf *pf)
 {
-	return -EOPNOTSUPP;
+	return 0;
 }
 
 static inline int ice_eswitch_rebuild(struct ice_pf *pf)
-- 
2.31.1


  parent reply	other threads:[~2022-04-14 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 16:15 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-04-14 Tony Nguyen
2022-04-14 16:15 ` [PATCH net 1/4] ice: xsk: check if Rx ring was filled up to the end Tony Nguyen
2022-04-14 16:15 ` Tony Nguyen [this message]
2022-04-14 16:15 ` [PATCH net 3/4] ice: fix crash in switchdev mode Tony Nguyen
2022-04-14 16:15 ` [PATCH net 4/4] ice: Fix memory leak in ice_get_orom_civd_data() Tony Nguyen
2022-04-15 10:40 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-04-14 patchwork-bot+netdevbpf

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=20220414161522.2320694-3-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=grzegorz.nitka@intel.com \
    --cc=konrad0.jankowski@intel.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=michal.swiatkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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).