i40e: Move client header location
Subsystems (3)
PATCH 1/2 i40e: Move client header location
Move i40e_client.h to include/linux/net/intel/*
since its shared between i40iw and i40e.
--- drivers/infiniband/hw/i40iw/Makefile | 1 - drivers/infiniband/hw/i40iw/i40iw.h | 2 +- drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_client.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_client.h | 203 -------------------------- include/linux/net/intel/i40e_client.h | 203 ++++++++++++++++++++++++++ 6 files changed, 206 insertions(+), 207 deletions(-) delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_client.h create mode 100644 include/linux/net/intel/i40e_client.h
drivers/infiniband/hw/i40iw/Makefile +0 -1
@@ -1,5 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-y := -I $(srctree)/drivers/net/ethernet/intel/i40e obj-$(CONFIG_INFINIBAND_I40IW) += i40iw.o
drivers/infiniband/hw/i40iw/i40iw.h +1 -1
@@ -45,6 +45,7 @@#include <linux/slab.h> #include <linux/io.h> #include <linux/crc32c.h> +#include <linux/net/intel/i40e_client.h> #include <rdma/ib_smi.h> #include <rdma/ib_verbs.h> #include <rdma/ib_pack.h>
@@ -57,7 +58,6 @@#include "i40iw_d.h" #include "i40iw_hmc.h" -#include <i40e_client.h> #include "i40iw_type.h" #include "i40iw_p.h" #include <rdma/i40iw-abi.h>
drivers/net/ethernet/intel/i40e/i40e.h +1 -1
@@ -38,7 +38,7 @@#include <net/xdp_sock.h> #include "i40e_type.h" #include "i40e_prototype.h" -#include "i40e_client.h" +#include <linux/net/intel/i40e_client.h> #include <linux/avf/virtchnl.h> #include "i40e_virtchnl_pf.h" #include "i40e_txrx.h"
drivers/net/ethernet/intel/i40e/i40e_client.c +1 -1
@@ -3,10 +3,10 @@#include <linux/list.h> #include <linux/errno.h> +#include <linux/net/intel/i40e_client.h> #include "i40e.h" #include "i40e_prototype.h" -#include "i40e_client.h" static const char i40e_client_interface_version_str[] =I40E_CLIENT_VERSION_STR ;static struct i40e_client *registered_client;
drivers/net/ethernet/intel/i40e/i40e_client.h deleted +0 -203
203 lines not on this page · raw message
include/linux/net/intel/i40e_client.h new file +203 -0
203 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 2/2 i40e: Register a virtbus device to provide RDMA
Register client virtbus device on the virtbus for the RDMA virtbus driver (irdma) to bind to. It allows to realize a single RDMA driver capable of working with multiple netdev drivers over multi-generation Intel HW supporting RDMA. There is also no load ordering dependencies between i40e and irdma.
Summary of changes:
* Support to add/remove virtbus devices
* Add 2 new client ops.
* i40e_client_device_register() which is called during RDMA probe() per PF. Validate client drv OPs and schedule service task to call open()
* i40e_client_device_unregister() called during RDMA remove() per PF. Call client close() and release_qvlist.
* The global register/unregister calls exported for i40iw are retained until i40iw is removed from the kernel.
--- drivers/net/ethernet/intel/Kconfig | 1 + drivers/net/ethernet/intel/i40e/i40e_client.c | 131 ++++++++++++++++++++++---- include/linux/net/intel/i40e_client.h | 15 +++ 3 files changed, 127 insertions(+), 20 deletions(-)
drivers/net/ethernet/intel/Kconfig +1 -0
@@ -241,6 +241,7 @@ config I40E tristate "Intel(R) Ethernet Controller XL710 Family support" imply PTP_1588_CLOCK depends on PCI + select VIRTUAL_BUS ---help--- This driver supports Intel(R) Ethernet Controller XL710 Family of devices. For more information on how to identify your adapter, go
drivers/net/ethernet/intel/i40e/i40e_client.c +111 -20
205 lines not on this page · raw message
include/linux/net/intel/i40e_client.h +15 -0
@@ -4,6 +4,9 @@#ifndef _I40E_CLIENT_H_#define _I40E_CLIENT_H_ +#include <linux/virtual_bus.h> + +#define I40E_PEER_RDMA_NAME "intel,i40e,rdma"#define I40E_CLIENT_STR_LENGTH 10/* Client interface version should be updated anytime there is a change in the
@@ -84,6 +87,7 @@ struct i40e_info {u8 lanmac[6 ];struct net_device *netdev;struct pci_dev *pcidev; +struct virtbus_device *vdev;u8 __iomem *hw_addr;u8 fid;/* function id, PF id or VF id */ #define I40E_CLIENT_FTYPE_PF 0
@@ -97,6 +101,7 @@ struct i40e_info {struct i40e_qvlist_info *qvlist_info;struct i40e_params params;struct i40e_ops *ops; +struct i40e_client *client;u16 msix_count;/* number of msix vectors*/ /* Array down below will be dynamically allocated based on msix_count */
@@ -107,6 +112,11 @@ struct i40e_info {u32 fw_build;/* firmware build number */ }; +struct i40e_virtbus_device { +struct virtbus_device vdev; +struct i40e_info *ldev; +}; +#define I40E_CLIENT_RESET_LEVEL_PF 1#define I40E_CLIENT_RESET_LEVEL_CORE 2#define I40E_CLIENT_VSI_FLAG_TCP_ENABLE BIT(1)
@@ -132,6 +142,11 @@ struct i40e_ops {struct i40e_client *client, bool is_vf, u32 vf_id, u32 flag, u32 valid_flag); + +int (*client_device_register)(struct i40e_info *ldev); + +void (*client_device_unregister)(struct i40e_info *ldev); + };struct i40e_client_ops {
Signature · 1 line
1.8.3.1
kbuild test robot
build botRe: [Intel-wired-lan] [PATCH 2/2] i40e: Register a virtbus device to provide RDMA
I love your patch! Yet something to improve:
Hi Shiraz,
I love your patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on linus/master v5.6-rc4 next-20200302] [cannot apply to jkirsher-next-queue/dev-queue]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Shiraz-Saleem/i40e-Move-client-header-location/20200303-035525 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: x86_64-randconfig-s1-20200303 (attached as .config) compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
If you fix the issue, kindly add following tag
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/intel/i40e/i40e.h:41:0,
from drivers/net/ethernet/intel/i40e/i40e_main.c:10: >> include/linux/net/intel/i40e_client.h:7:31: fatal error: linux/virtual_bus.h: No such file or directory
compilation terminated.
vim +7 include/linux/net/intel/i40e_client.h
6
> 7 #include <linux/virtual_bus.h>
8 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Bowers
PATCH 2/2 i40e: Register a virtbus device to provide RDMA
In reply to Shiraz SaleemQuoted 26 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Shiraz Saleem
Sent: Monday, March 2, 2020 8:52 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Saleem, Shiraz <[email protected]>
Subject: [Intel-wired-lan] [PATCH 2/2] i40e: Register a virtbus device to provide RDMARegister client virtbus device on the virtbus for the RDMA virtbus driver (irdma) to bind to. It allows to realize a single RDMA driver capable of working with multiple netdev drivers over multi-generation Intel HW supporting RDMA.
There is also no load ordering dependencies between i40e and irdma.Summary of changes:
* Support to add/remove virtbus devices
* Add 2 new client ops.
*i40e_client_device_register()which is called during RDMAprobe()per PF. Validate client drv OPs and schedule service task to callopen()
*i40e_client_device_unregister()called during RDMAremove()per PF. Call clientclose()andrelease_qvlist.
* The global register/unregister calls exported for i40iw are retained until i40iw is removed from the kernel.
Quoted 8 lines
Signed-off-by Mustafa Ismail <[email protected]>Signed-off-by Shiraz Saleem <[email protected]>--- drivers/net/ethernet/intel/Kconfig | 1 + drivers/net/ethernet/intel/i40e/i40e_client.c | 131 ++++++++++++++++++++++---- include/linux/net/intel/i40e_client.h | 15 +++ 3 files changed, 127 insertions(+), 20 deletions(-)
Bowers
PATCH 1/2 i40e: Move client header location
In reply to Shiraz SaleemQuoted 12 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Shiraz Saleem
Sent: Monday, March 2, 2020 8:52 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Saleem, Shiraz <[email protected]>
Subject: [Intel-wired-lan] [PATCH 1/2] i40e: Move client header locationMove
i40e_client.htoinclude/linux/net/intel/*since its shared between i40iw and i40e.Signed-off-by Shiraz Saleem <[email protected]>
Quoted 11 lines
--- drivers/infiniband/hw/i40iw/Makefile | 1 - drivers/infiniband/hw/i40iw/i40iw.h | 2 +- drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_client.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_client.h | 203 -------------------------- include/linux/net/intel/i40e_client.h | 203 ++++++++++++++++++++++++++ 6 files changed, 206 insertions(+), 207 deletions(-) delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_client.h create mode 100644 include/linux/net/intel/i40e_client.h