Commit 256d6a6a authored by Upinder Malhi's avatar Upinder Malhi Committed by Roland Dreier

IB/usnic: Port over usnic_ib_qp_grp.[hc] to new usnic_fwd.h

This patch ports usnic_ib_qp_grp.[hc] to the new interface
of usnic_fwd.h.
Signed-off-by: default avatarUpinder Malhi <umalhi@cisco.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 8af94ac6
......@@ -26,9 +26,6 @@
#include "usnic_fwd.h"
#include "usnic_vnic.h"
#define MAX_QP_GRP_FILTERS 10
#define DFLT_FILTER_IDX 0
/*
* The qp group struct represents all the hw resources needed to present a ib_qp
*/
......@@ -38,11 +35,8 @@ struct usnic_ib_qp_grp {
int grp_id;
struct usnic_fwd_dev *ufdev;
short unsigned filter_cnt;
struct usnic_fwd_filter filters[MAX_QP_GRP_FILTERS];
struct list_head filter_hndls;
enum usnic_transport_type transport;
struct usnic_ib_ucontext *ctx;
struct list_head flows_lst;
struct usnic_vnic_res_chunk **res_chunk_list;
......@@ -55,6 +49,18 @@ struct usnic_ib_qp_grp {
struct kobject kobj;
};
struct usnic_ib_qp_grp_flow {
struct usnic_fwd_flow *flow;
enum usnic_transport_type trans_type;
union {
struct {
uint16_t port_num;
} usnic_roce;
};
struct usnic_ib_qp_grp *qp_grp;
struct list_head link;
};
static const struct
usnic_vnic_res_spec min_transport_spec[USNIC_TRANSPORT_MAX] = {
{ /*USNIC_TRANSPORT_UNKNOWN*/
......@@ -79,11 +85,11 @@ struct usnic_ib_qp_grp *
usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, struct usnic_ib_vf *vf,
struct usnic_ib_pd *pd,
struct usnic_vnic_res_spec *res_spec,
enum usnic_transport_type transport);
struct usnic_transport_spec *trans_spec);
void usnic_ib_qp_grp_destroy(struct usnic_ib_qp_grp *qp_grp);
int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp,
enum ib_qp_state new_state,
struct usnic_fwd_filter *fwd_filter);
void *data);
struct usnic_vnic_res_chunk
*usnic_ib_qp_grp_get_chunk(struct usnic_ib_qp_grp *qp_grp,
enum usnic_vnic_res_type type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment