diff options
author | Noa Osherovich <noaos@mellanox.com> | 2017-01-18 08:39:55 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-14 11:41:10 -0500 |
commit | 10bac72be10542a29169582e6f74f88bcdfdf19f (patch) | |
tree | fc2b7375d881d0855b3601c48d3110d3dd5f4f60 | |
parent | ebaaee253ad3a3c573ab7d3d77e849056bdfa9ea (diff) |
IB/core: Enable WQ creation and modification with cvlan offload
Enable WQ creation and modification with cvlan stripping offload.
This includes:
- Adding WQ creation flags.
- Extending modify WQ to get flags and flags mask to enable turning
it on and off.
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | include/rdma/ib_verbs.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 903ed76604f5..7028b0ec8447 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1494,6 +1494,10 @@ struct ib_wq { | |||
1494 | atomic_t usecnt; | 1494 | atomic_t usecnt; |
1495 | }; | 1495 | }; |
1496 | 1496 | ||
1497 | enum ib_wq_flags { | ||
1498 | IB_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, | ||
1499 | }; | ||
1500 | |||
1497 | struct ib_wq_init_attr { | 1501 | struct ib_wq_init_attr { |
1498 | void *wq_context; | 1502 | void *wq_context; |
1499 | enum ib_wq_type wq_type; | 1503 | enum ib_wq_type wq_type; |
@@ -1501,16 +1505,20 @@ struct ib_wq_init_attr { | |||
1501 | u32 max_sge; | 1505 | u32 max_sge; |
1502 | struct ib_cq *cq; | 1506 | struct ib_cq *cq; |
1503 | void (*event_handler)(struct ib_event *, void *); | 1507 | void (*event_handler)(struct ib_event *, void *); |
1508 | u32 create_flags; /* Use enum ib_wq_flags */ | ||
1504 | }; | 1509 | }; |
1505 | 1510 | ||
1506 | enum ib_wq_attr_mask { | 1511 | enum ib_wq_attr_mask { |
1507 | IB_WQ_STATE = 1 << 0, | 1512 | IB_WQ_STATE = 1 << 0, |
1508 | IB_WQ_CUR_STATE = 1 << 1, | 1513 | IB_WQ_CUR_STATE = 1 << 1, |
1514 | IB_WQ_FLAGS = 1 << 2, | ||
1509 | }; | 1515 | }; |
1510 | 1516 | ||
1511 | struct ib_wq_attr { | 1517 | struct ib_wq_attr { |
1512 | enum ib_wq_state wq_state; | 1518 | enum ib_wq_state wq_state; |
1513 | enum ib_wq_state curr_wq_state; | 1519 | enum ib_wq_state curr_wq_state; |
1520 | u32 flags; /* Use enum ib_wq_flags */ | ||
1521 | u32 flags_mask; /* Use enum ib_wq_flags */ | ||
1514 | }; | 1522 | }; |
1515 | 1523 | ||
1516 | struct ib_rwq_ind_table { | 1524 | struct ib_rwq_ind_table { |