summaryrefslogtreecommitdiffstats
path: root/include/linux/qed/qed_roce_if.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/qed/qed_roce_if.h')
-rw-r--r--include/linux/qed/qed_roce_if.h80
1 files changed, 28 insertions, 52 deletions
diff --git a/include/linux/qed/qed_roce_if.h b/include/linux/qed/qed_roce_if.h
index cbb2ff0ce4bc..8e70f5ee05af 100644
--- a/include/linux/qed/qed_roce_if.h
+++ b/include/linux/qed/qed_roce_if.h
@@ -34,8 +34,6 @@
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/list.h>
-#include <linux/mutex.h>
-#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/qed/qed_if.h>
#include <linux/qed/qed_ll2_if.h>
@@ -491,42 +489,6 @@ struct qed_roce_ll2_packet {
enum qed_roce_ll2_tx_dest tx_dest;
};
-struct qed_roce_ll2_tx_params {
- int reserved;
-};
-
-struct qed_roce_ll2_rx_params {
- u16 vlan_id;
- u8 smac[ETH_ALEN];
- int rc;
-};
-
-struct qed_roce_ll2_cbs {
- void (*tx_cb)(void *pdev, struct qed_roce_ll2_packet *pkt);
-
- void (*rx_cb)(void *pdev, struct qed_roce_ll2_packet *pkt,
- struct qed_roce_ll2_rx_params *params);
-};
-
-struct qed_roce_ll2_params {
- u16 max_rx_buffers;
- u16 max_tx_buffers;
- u16 mtu;
- u8 mac_address[ETH_ALEN];
- struct qed_roce_ll2_cbs cbs;
- void *cb_cookie;
-};
-
-struct qed_roce_ll2_info {
- u8 handle;
- struct qed_roce_ll2_cbs cbs;
- u8 mac_address[ETH_ALEN];
- void *cb_cookie;
-
- /* Lock to protect ll2 */
- struct mutex lock;
-};
-
enum qed_rdma_type {
QED_RDMA_TYPE_ROCE,
};
@@ -579,26 +541,40 @@ struct qed_rdma_ops {
int (*rdma_query_qp)(void *rdma_cxt, struct qed_rdma_qp *qp,
struct qed_rdma_query_qp_out_params *oparams);
int (*rdma_destroy_qp)(void *rdma_cxt, struct qed_rdma_qp *qp);
+
int
(*rdma_register_tid)(void *rdma_cxt,
struct qed_rdma_register_tid_in_params *iparams);
+
int (*rdma_deregister_tid)(void *rdma_cxt, u32 itid);
int (*rdma_alloc_tid)(void *rdma_cxt, u32 *itid);
void (*rdma_free_tid)(void *rdma_cxt, u32 itid);
- int (*roce_ll2_start)(struct qed_dev *cdev,
- struct qed_roce_ll2_params *params);
- int (*roce_ll2_stop)(struct qed_dev *cdev);
- int (*roce_ll2_tx)(struct qed_dev *cdev,
- struct qed_roce_ll2_packet *packet,
- struct qed_roce_ll2_tx_params *params);
- int (*roce_ll2_post_rx_buffer)(struct qed_dev *cdev,
- struct qed_roce_ll2_buffer *buf,
- u64 cookie, u8 notify_fw);
- int (*roce_ll2_set_mac_filter)(struct qed_dev *cdev,
- u8 *old_mac_address,
- u8 *new_mac_address);
- int (*roce_ll2_stats)(struct qed_dev *cdev,
- struct qed_ll2_stats *stats);
+
+ int (*ll2_acquire_connection)(void *rdma_cxt,
+ struct qed_ll2_acquire_data *data);
+
+ int (*ll2_establish_connection)(void *rdma_cxt, u8 connection_handle);
+ int (*ll2_terminate_connection)(void *rdma_cxt, u8 connection_handle);
+ void (*ll2_release_connection)(void *rdma_cxt, u8 connection_handle);
+
+ int (*ll2_prepare_tx_packet)(void *rdma_cxt,
+ u8 connection_handle,
+ struct qed_ll2_tx_pkt_info *pkt,
+ bool notify_fw);
+
+ int (*ll2_set_fragment_of_tx_packet)(void *rdma_cxt,
+ u8 connection_handle,
+ dma_addr_t addr,
+ u16 nbytes);
+ int (*ll2_post_rx_buffer)(void *rdma_cxt, u8 connection_handle,
+ dma_addr_t addr, u16 buf_len, void *cookie,
+ u8 notify_fw);
+ int (*ll2_get_stats)(void *rdma_cxt,
+ u8 connection_handle,
+ struct qed_ll2_stats *p_stats);
+ int (*ll2_set_mac_filter)(struct qed_dev *cdev,
+ u8 *old_mac_address, u8 *new_mac_address);
+
};
const struct qed_rdma_ops *qed_get_rdma_ops(void);
OpenPOWER on IntegriCloud