summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
diff options
context:
space:
mode:
authorUpinder Malhi <umalhi@cisco.com>2014-01-09 23:48:09 +0100
committerRoland Dreier <roland@purestorage.com>2014-01-14 09:44:42 +0100
commit256d6a6ac52ee02e897cec88ecc96c3ae7f9cb88 (patch)
treedad8f786129e3aa6636e5512f7012388ce17d37c /drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
parentIB/usnic: Port over main.c and verbs.c to the usnic_fwd.h (diff)
downloadlinux-256d6a6ac52ee02e897cec88ecc96c3ae7f9cb88.tar.xz
linux-256d6a6ac52ee02e897cec88ecc96c3ae7f9cb88.zip
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: Upinder Malhi <umalhi@cisco.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
index 6416a956dc4a..570fea2e2cb9 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
+++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
@@ -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);