All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next PATCH 02/25] ice: rename ice_virtchnl_pf.c to ice_sriov.c
Date: Tue, 22 Feb 2022 16:26:49 -0800	[thread overview]
Message-ID: <20220223002712.2771809-3-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20220223002712.2771809-1-jacob.e.keller@intel.com>

The ice_virtchnl_pf.c and ice_virtchnl_pf.h files are where most of the
code for implementing Single Root IOV virtualization resides. This code
includes support for bringing up and tearing down VFs, hooks into the
kernel SR-IOV netdev operations, and for handling virtchnl messages from
VFs.

In the future, we plan to support Scalable IOV in addition to Single
Root IOV as an alternative virtualization scheme. This implementation
will re-use some but not all of the code in ice_virtchnl_pf.c

To prepare for this future, we want to refactor and split up the code in
ice_virtchnl_pf.c into the following scheme:

 * ice_vf_lib.[ch]

   Basic VF structures and accessors. This is where scheme-independent
   code will reside.

 * ice_virtchnl.[ch]

   Virtchnl message handling. This is where the bulk of the logic for
   processing messages from VFs using the virtchnl messaging scheme will
   reside. This is separated from ice_vf_lib.c because it is distinct
   and has a bulk of the processing code.

 * ice_sriov.[ch]

   Single Root IOV implementation, including initialization and the
   routines for interacting with SR-IOV based netdev operations.

 * (future) ice_siov.[ch]

   Scalable IOV implementation.

As a first step, lets assume that all of the code in
ice_virtchnl_pf.[ch] is for Single Root IOV. Rename this file to
ice_sriov.c and its header to ice_sriov.h

Future changes will further split out the code in these files following
the plan outlined here.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/ice/Makefile                     | 2 +-
 drivers/net/ethernet/intel/ice/ice.h                        | 2 +-
 drivers/net/ethernet/intel/ice/ice_base.c                   | 2 +-
 drivers/net/ethernet/intel/ice/ice_repr.c                   | 2 +-
 .../ethernet/intel/ice/{ice_virtchnl_pf.c => ice_sriov.c}   | 0
 .../ethernet/intel/ice/{ice_virtchnl_pf.h => ice_sriov.h}   | 6 +++---
 drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c        | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)
 rename drivers/net/ethernet/intel/ice/{ice_virtchnl_pf.c => ice_sriov.c} (100%)
 rename drivers/net/ethernet/intel/ice/{ice_virtchnl_pf.h => ice_sriov.h} (99%)

diff --git a/drivers/net/ethernet/intel/ice/Makefile b/drivers/net/ethernet/intel/ice/Makefile
index 451098e25023..816e81832b7f 100644
--- a/drivers/net/ethernet/intel/ice/Makefile
+++ b/drivers/net/ethernet/intel/ice/Makefile
@@ -38,7 +38,7 @@ ice-$(CONFIG_PCI_IOV) +=	\
 	ice_virtchnl_fdir.o	\
 	ice_vf_mbx.o		\
 	ice_vf_vsi_vlan_ops.o	\
-	ice_virtchnl_pf.o
+	ice_sriov.o
 ice-$(CONFIG_PTP_1588_CLOCK) += ice_ptp.o ice_ptp_hw.o
 ice-$(CONFIG_TTY) += ice_gnss.o
 ice-$(CONFIG_DCB) += ice_dcb.o ice_dcb_nl.o ice_dcb_lib.o
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 6c41edd99410..0fd15b45ce23 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -66,7 +66,7 @@
 #include "ice_flow.h"
 #include "ice_sched.h"
 #include "ice_idc_int.h"
-#include "ice_virtchnl_pf.h"
+#include "ice_sriov.h"
 #include "ice_vf_mbx.h"
 #include "ice_ptp.h"
 #include "ice_fdir.h"
diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c
index a3094470d31d..136d7911adb4 100644
--- a/drivers/net/ethernet/intel/ice/ice_base.c
+++ b/drivers/net/ethernet/intel/ice/ice_base.c
@@ -5,7 +5,7 @@
 #include "ice_base.h"
 #include "ice_lib.h"
 #include "ice_dcb_lib.h"
-#include "ice_virtchnl_pf.h"
+#include "ice_sriov.h"
 
 static bool ice_alloc_rx_buf_zc(struct ice_rx_ring *rx_ring)
 {
diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c
index f8db3ca521da..e0be27657569 100644
--- a/drivers/net/ethernet/intel/ice/ice_repr.c
+++ b/drivers/net/ethernet/intel/ice/ice_repr.c
@@ -4,7 +4,7 @@
 #include "ice.h"
 #include "ice_eswitch.h"
 #include "ice_devlink.h"
-#include "ice_virtchnl_pf.h"
+#include "ice_sriov.h"
 #include "ice_tc_lib.h"
 
 /**
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_sriov.c
similarity index 100%
rename from drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
rename to drivers/net/ethernet/intel/ice/ice_sriov.c
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_sriov.h
similarity index 99%
rename from drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
rename to drivers/net/ethernet/intel/ice/ice_sriov.h
index 3938204feeaf..18a2dd537f9f 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_sriov.h
@@ -1,8 +1,8 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (c) 2018, Intel Corporation. */
 
-#ifndef _ICE_VIRTCHNL_PF_H_
-#define _ICE_VIRTCHNL_PF_H_
+#ifndef _ICE_SRIOV_H_
+#define _ICE_SRIOV_H_
 #include "ice.h"
 #include "ice_virtchnl_fdir.h"
 #include "ice_vsi_vlan_ops.h"
@@ -434,4 +434,4 @@ static inline bool ice_vf_is_port_vlan_ena(struct ice_vf __always_unused *vf)
 	return false;
 }
 #endif /* CONFIG_PCI_IOV */
-#endif /* _ICE_VIRTCHNL_PF_H_ */
+#endif /* _ICE_SRIOV_H_ */
diff --git a/drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c b/drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c
index b16f946185f2..5ecc0ee9a78e 100644
--- a/drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c
+++ b/drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c
@@ -6,7 +6,7 @@
 #include "ice_vlan_mode.h"
 #include "ice.h"
 #include "ice_vf_vsi_vlan_ops.h"
-#include "ice_virtchnl_pf.h"
+#include "ice_sriov.h"
 
 static int
 noop_vlan_arg(struct ice_vsi __always_unused *vsi,
-- 
2.35.1.129.gb80121027d12


  parent reply	other threads:[~2022-02-23  0:26 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23  0:26 [Intel-wired-lan] [net-next PATCH 00/25] ice: reorganize virtualization code Jacob Keller
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 01/25] ice: rename ice_sriov.c to ice_vf_mbx.c Jacob Keller
2022-03-02 20:05   ` Jankowski, Konrad0
2022-02-23  0:26 ` Jacob Keller [this message]
2022-03-02 20:05   ` [Intel-wired-lan] [net-next PATCH 02/25] ice: rename ice_virtchnl_pf.c to ice_sriov.c Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 03/25] ice: remove circular header dependencies on ice.h Jacob Keller
2022-03-02  8:20   ` G, GurucharanX
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 04/25] ice: convert vf->vc_ops to a const pointer Jacob Keller
2022-03-02 11:15   ` Penigalapati, Sandeep
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 05/25] ice: remmove unused definitions from ice_sriov.h Jacob Keller
2022-03-02 20:03   ` Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 06/25] ice: rename ICE_MAX_VF_COUNT to avoid confusion Jacob Keller
2022-03-02 20:03   ` Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 07/25] ice: refactor spoofchk control code in ice_sriov.c Jacob Keller
2022-03-02 20:02   ` Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 08/25] ice: move ice_set_vf_port_vlan near other .ndo ops Jacob Keller
2022-03-02 20:02   ` Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 09/25] ice: cleanup error logging for ice_ena_vfs Jacob Keller
2022-03-02 20:01   ` Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 10/25] ice: log an error message when eswitch fails to configure Jacob Keller
2022-03-03  7:51   ` Penigalapati, Sandeep
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 11/25] ice: use ice_is_vf_trusted helper function Jacob Keller
2022-03-02 20:01   ` Jankowski, Konrad0
2022-02-23  0:26 ` [Intel-wired-lan] [net-next PATCH 12/25] ice: introduce ice_vf_lib.c, ice_vf_lib.h, and ice_vf_lib_private.h Jacob Keller
2022-03-02 20:00   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 13/25] ice: fix incorrect dev_dbg print mistaking 'i' for vf->vf_id Jacob Keller
2022-03-02 20:00   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 14/25] ice: introduce VF operations structure for reset flows Jacob Keller
2022-03-02 19:59   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 15/25] ice: fix a long line warning in ice_reset_vf Jacob Keller
2022-03-02 19:57   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 16/25] ice: move reset functionality into ice_vf_lib.c Jacob Keller
2022-03-02 19:56   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 17/25] ice: drop is_vflr parameter from ice_reset_all_vfs Jacob Keller
2022-03-02 19:47   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 18/25] ice: make ice_reset_all_vfs void Jacob Keller
2022-03-02 19:47   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 19/25] ice: convert ice_reset_vf to standard error codes Jacob Keller
2022-03-02 19:46   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 20/25] ice: convert ice_reset_vf to take flags Jacob Keller
2022-03-02 19:45   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 21/25] ice: introduce ICE_VF_RESET_NOTIFY flag Jacob Keller
2022-03-02 19:55   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 22/25] ice: introduce ICE_VF_RESET_LOCK flag Jacob Keller
2022-03-02 19:44   ` Jankowski, Konrad0
2022-03-02 19:45   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 23/25] ice: cleanup long longs in ice_sriov.c Jacob Keller
2022-02-23  1:47   ` Jesse Brandeburg
2022-02-23  9:42     ` Keller, Jacob E
2022-02-23 18:02       ` Nguyen, Anthony L
2022-03-02 19:43   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 24/25] ice: introduce ice_virtchnl.c and ice_virtchnl.h Jacob Keller
2022-03-02 19:41   ` Jankowski, Konrad0
2022-02-23  0:27 ` [Intel-wired-lan] [net-next PATCH 25/25] ice: remove PF pointer from ice_check_vf_init Jacob Keller
2022-03-02 19:40   ` Jankowski, Konrad0

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=20220223002712.2771809-3-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.