diff options
author | Kalderon, Michal <Michal.Kalderon@cavium.com> | 2017-07-02 10:29:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-03 01:43:45 -0700 |
commit | 65a91a6cdb868a28b919ca133c0f9d9dfd9a635a (patch) | |
tree | 6710c8dfab8752cdc974f9e9122ca832613b4b66 /include/linux/qed | |
parent | b5c29ca7dab75f29a7df6e82285742f830d8ed1a (diff) | |
download | linux-65a91a6cdb868a28b919ca133c0f9d9dfd9a635a.tar.gz linux-65a91a6cdb868a28b919ca133c0f9d9dfd9a635a.tar.bz2 linux-65a91a6cdb868a28b919ca133c0f9d9dfd9a635a.zip |
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 'include/linux/qed')
-rw-r--r-- | include/linux/qed/qed_rdma_if.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/linux/qed/qed_rdma_if.h b/include/linux/qed/qed_rdma_if.h index 5b4bb09a3354..28df5688ad0c 100644 --- a/include/linux/qed/qed_rdma_if.h +++ b/include/linux/qed/qed_rdma_if.h @@ -470,6 +470,52 @@ struct qed_rdma_counters_out_params { #define QED_ROCE_TX_HEAD_FAILURE (1) #define QED_ROCE_TX_FRAG_FAILURE (2) +enum qed_iwarp_event_type { + QED_IWARP_EVENT_MPA_REQUEST, /* Passive side request received */ +}; + +enum qed_tcp_ip_version { + QED_TCP_IPV4, + QED_TCP_IPV6, +}; + +struct qed_iwarp_cm_info { + enum qed_tcp_ip_version ip_version; + u32 remote_ip[4]; + u32 local_ip[4]; + u16 remote_port; + u16 local_port; + u16 vlan; + u8 ord; + u8 ird; + u16 private_data_len; + const void *private_data; +}; + +struct qed_iwarp_cm_event_params { + enum qed_iwarp_event_type event; + const struct qed_iwarp_cm_info *cm_info; + void *ep_context; /* To be passed to accept call */ + int status; +}; + +typedef int (*iwarp_event_handler) (void *context, + struct qed_iwarp_cm_event_params *event); + +struct qed_iwarp_listen_in { + iwarp_event_handler event_cb; + void *cb_context; /* passed to event_cb */ + u32 max_backlog; + enum qed_tcp_ip_version ip_version; + u32 ip_addr[4]; + u16 port; + u16 vlan; +}; + +struct qed_iwarp_listen_out { + void *handle; +}; + struct qed_roce_ll2_header { void *vaddr; dma_addr_t baddr; @@ -576,6 +622,12 @@ struct qed_rdma_ops { int (*ll2_set_mac_filter)(struct qed_dev *cdev, u8 *old_mac_address, u8 *new_mac_address); + int (*iwarp_create_listen)(void *rdma_cxt, + struct qed_iwarp_listen_in *iparams, + struct qed_iwarp_listen_out *oparams); + + int (*iwarp_destroy_listen)(void *rdma_cxt, void *handle); + }; const struct qed_rdma_ops *qed_get_rdma_ops(void); |