Skip to content

Commit e3219ce

Browse files
anjalisinghai1dledford
authored andcommitted
i40e: Add support for client interface for IWARP driver
This patch adds a Client interface for i40iw driver support. Also expands the Virtchannel to support messages from i40evf driver on behalf of i40iwvf driver. This client API is used by the i40iw and i40iwvf driver to access the core driver resources brokered by the i40e driver. Signed-off-by: Anjali Singhai Jain <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent fc77dbd commit e3219ce

File tree

9 files changed

+1657
-13
lines changed

9 files changed

+1657
-13
lines changed

drivers/net/ethernet/intel/i40e/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ i40e-objs := i40e_main.o \
4141
i40e_diag.o \
4242
i40e_txrx.o \
4343
i40e_ptp.o \
44+
i40e_client.o \
4445
i40e_virtchnl_pf.o
4546

4647
i40e-$(CONFIG_I40E_DCB) += i40e_dcb.o i40e_dcb_nl.o

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#ifdef I40E_FCOE
5959
#include "i40e_fcoe.h"
6060
#endif
61+
#include "i40e_client.h"
6162
#include "i40e_virtchnl.h"
6263
#include "i40e_virtchnl_pf.h"
6364
#include "i40e_txrx.h"
@@ -178,6 +179,7 @@ struct i40e_lump_tracking {
178179
u16 search_hint;
179180
u16 list[0];
180181
#define I40E_PILE_VALID_BIT 0x8000
182+
#define I40E_IWARP_IRQ_PILE_ID (I40E_PILE_VALID_BIT - 2)
181183
};
182184

183185
#define I40E_DEFAULT_ATR_SAMPLE_RATE 20
@@ -270,6 +272,8 @@ struct i40e_pf {
270272
#endif /* I40E_FCOE */
271273
u16 num_lan_qps; /* num lan queues this PF has set up */
272274
u16 num_lan_msix; /* num queue vectors for the base PF vsi */
275+
u16 num_iwarp_msix; /* num of iwarp vectors for this PF */
276+
int iwarp_base_vector;
273277
int queues_left; /* queues left unclaimed */
274278
u16 alloc_rss_size; /* allocated RSS queues */
275279
u16 rss_size_max; /* HW defined max RSS queues */
@@ -317,6 +321,7 @@ struct i40e_pf {
317321
#define I40E_FLAG_16BYTE_RX_DESC_ENABLED BIT_ULL(13)
318322
#define I40E_FLAG_CLEAN_ADMINQ BIT_ULL(14)
319323
#define I40E_FLAG_FILTER_SYNC BIT_ULL(15)
324+
#define I40E_FLAG_SERVICE_CLIENT_REQUESTED BIT_ULL(16)
320325
#define I40E_FLAG_PROCESS_MDD_EVENT BIT_ULL(17)
321326
#define I40E_FLAG_PROCESS_VFLR_EVENT BIT_ULL(18)
322327
#define I40E_FLAG_SRIOV_ENABLED BIT_ULL(19)
@@ -557,6 +562,8 @@ struct i40e_vsi {
557562
struct kobject *kobj; /* sysfs object */
558563
bool current_isup; /* Sync 'link up' logging */
559564

565+
void *priv; /* client driver data reference. */
566+
560567
/* VSI specific handlers */
561568
irqreturn_t (*irq_handler)(int irq, void *data);
562569

@@ -714,6 +721,10 @@ void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
714721
struct i40e_vsi_context *ctxt,
715722
u8 enabled_tc, bool is_add);
716723
#endif
724+
void i40e_service_event_schedule(struct i40e_pf *pf);
725+
void i40e_notify_client_of_vf_msg(struct i40e_vsi *vsi, u32 vf_id,
726+
u8 *msg, u16 len);
727+
717728
int i40e_vsi_control_rings(struct i40e_vsi *vsi, bool enable);
718729
int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count);
719730
struct i40e_veb *i40e_veb_setup(struct i40e_pf *pf, u16 flags, u16 uplink_seid,
@@ -736,6 +747,17 @@ static inline void i40e_dbg_pf_exit(struct i40e_pf *pf) {}
736747
static inline void i40e_dbg_init(void) {}
737748
static inline void i40e_dbg_exit(void) {}
738749
#endif /* CONFIG_DEBUG_FS*/
750+
/* needed by client drivers */
751+
int i40e_lan_add_device(struct i40e_pf *pf);
752+
int i40e_lan_del_device(struct i40e_pf *pf);
753+
void i40e_client_subtask(struct i40e_pf *pf);
754+
void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi);
755+
void i40e_notify_client_of_netdev_open(struct i40e_vsi *vsi);
756+
void i40e_notify_client_of_netdev_close(struct i40e_vsi *vsi, bool reset);
757+
void i40e_notify_client_of_vf_enable(struct i40e_pf *pf, u32 num_vfs);
758+
void i40e_notify_client_of_vf_reset(struct i40e_pf *pf, u32 vf_id);
759+
int i40e_vf_client_capable(struct i40e_pf *pf, u32 vf_id,
760+
enum i40e_client_type type);
739761
/**
740762
* i40e_irq_dynamic_enable - Enable default interrupt generation settings
741763
* @vsi: pointer to a vsi

0 commit comments

Comments
 (0)