diff options
author | Kalderon, Michal <Michal.Kalderon@cavium.com> | 2017-07-02 10:29:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-03 11:43:45 +0300 |
commit | 456a584947d5b92d5e5a62cc68125ab5f150aa8c (patch) | |
tree | 183b93e8d945c2d8afb266219121cbbda3988ab5 /include/linux/qed | |
parent | 65a91a6cdb868a28b919ca133c0f9d9dfd9a635a (diff) | |
download | linux-456a584947d5b92d5e5a62cc68125ab5f150aa8c.tar.xz |
qed: iWARP CM add passive side connect
This patch implements the passive side connect.
It addresses pre-allocating resources, creating a connection
element upon valid SYN packet received. Calling upper layer and
implementation of the accept/reject calls.
Error handling is not part of this patch.
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/qed')
-rw-r--r-- | include/linux/qed/common_hsi.h | 2 | ||||
-rw-r--r-- | include/linux/qed/qed_rdma_if.h | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/include/linux/qed/common_hsi.h b/include/linux/qed/common_hsi.h index 885ae1379b5a..39e2a2ac2471 100644 --- a/include/linux/qed/common_hsi.h +++ b/include/linux/qed/common_hsi.h @@ -38,6 +38,8 @@ #include <linux/slab.h> /* dma_addr_t manip */ +#define PTR_LO(x) ((u32)(((uintptr_t)(x)) & 0xffffffff)) +#define PTR_HI(x) ((u32)((((uintptr_t)(x)) >> 16) >> 16)) #define DMA_LO_LE(x) cpu_to_le32(lower_32_bits(x)) #define DMA_HI_LE(x) cpu_to_le32(upper_32_bits(x)) #define DMA_REGPAIR_LE(x, val) do { \ diff --git a/include/linux/qed/qed_rdma_if.h b/include/linux/qed/qed_rdma_if.h index 28df5688ad0c..c4c241fe2579 100644 --- a/include/linux/qed/qed_rdma_if.h +++ b/include/linux/qed/qed_rdma_if.h @@ -471,7 +471,8 @@ struct qed_rdma_counters_out_params { #define QED_ROCE_TX_FRAG_FAILURE (2) enum qed_iwarp_event_type { - QED_IWARP_EVENT_MPA_REQUEST, /* Passive side request received */ + QED_IWARP_EVENT_MPA_REQUEST, /* Passive side request received */ + QED_IWARP_EVENT_PASSIVE_COMPLETE, /* ack on mpa response */ }; enum qed_tcp_ip_version { @@ -516,6 +517,23 @@ struct qed_iwarp_listen_out { void *handle; }; +struct qed_iwarp_accept_in { + void *ep_context; + void *cb_context; + struct qed_rdma_qp *qp; + const void *private_data; + u16 private_data_len; + u8 ord; + u8 ird; +}; + +struct qed_iwarp_reject_in { + void *ep_context; + void *cb_context; + const void *private_data; + u16 private_data_len; +}; + struct qed_roce_ll2_header { void *vaddr; dma_addr_t baddr; @@ -626,6 +644,12 @@ struct qed_rdma_ops { struct qed_iwarp_listen_in *iparams, struct qed_iwarp_listen_out *oparams); + int (*iwarp_accept)(void *rdma_cxt, + struct qed_iwarp_accept_in *iparams); + + int (*iwarp_reject)(void *rdma_cxt, + struct qed_iwarp_reject_in *iparams); + int (*iwarp_destroy_listen)(void *rdma_cxt, void *handle); }; |