summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_iwarp.h
diff options
context:
space:
mode:
authorKalderon, Michal <Michal.Kalderon@cavium.com>2017-07-02 10:29:26 +0300
committerDavid S. Miller <davem@davemloft.net>2017-07-03 01:43:45 -0700
commit65a91a6cdb868a28b919ca133c0f9d9dfd9a635a (patch)
tree6710c8dfab8752cdc974f9e9122ca832613b4b66 /drivers/net/ethernet/qlogic/qed/qed_iwarp.h
parentb5c29ca7dab75f29a7df6e82285742f830d8ed1a (diff)
downloadlinux-65a91a6cdb868a28b919ca133c0f9d9dfd9a635a.tar.bz2
qed: iWARP CM add listener functions and initial SYN processing
This patch adds the ability to add and remove listeners and identify whether the SYN packet received is intended for iWARP or not. If a listener is not found the SYN packet is posted back to the chip. 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 'drivers/net/ethernet/qlogic/qed/qed_iwarp.h')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_iwarp.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h
index 068b8594f1c5..29005ac83a6a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h
@@ -54,6 +54,7 @@ struct qed_iwarp_ll2_buff {
};
struct qed_iwarp_info {
+ struct list_head listen_list; /* qed_iwarp_listener */
spinlock_t iw_lock; /* for iwarp resources */
spinlock_t qp_lock; /* for teardown races */
u32 rcv_wnd_scale;
@@ -67,6 +68,21 @@ struct qed_iwarp_info {
enum mpa_rtr_type rtr_type;
};
+struct qed_iwarp_listener {
+ struct list_head list_entry;
+
+ /* The event_cb function is called for connection requests.
+ * The cb_context is passed to the event_cb function.
+ */
+ iwarp_event_handler event_cb;
+ void *cb_context;
+ u32 max_backlog;
+ u32 ip_addr[4];
+ u16 port;
+ u16 vlan;
+ u8 ip_version;
+};
+
int qed_iwarp_alloc(struct qed_hwfn *p_hwfn);
int qed_iwarp_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
@@ -94,4 +110,11 @@ int qed_iwarp_fw_destroy(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);
void qed_iwarp_query_qp(struct qed_rdma_qp *qp,
struct qed_rdma_query_qp_out_params *out_params);
+int
+qed_iwarp_create_listen(void *rdma_cxt,
+ struct qed_iwarp_listen_in *iparams,
+ struct qed_iwarp_listen_out *oparams);
+
+int qed_iwarp_destroy_listen(void *rdma_cxt, void *handle);
+
#endif