0001
0002
0003
0004
0005
0006
0007 #ifndef RXE_H
0008 #define RXE_H
0009
0010 #ifdef pr_fmt
0011 #undef pr_fmt
0012 #endif
0013 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
0014
0015 #include <linux/skbuff.h>
0016
0017 #include <rdma/ib_verbs.h>
0018 #include <rdma/ib_user_verbs.h>
0019 #include <rdma/ib_pack.h>
0020 #include <rdma/ib_smi.h>
0021 #include <rdma/ib_umem.h>
0022 #include <rdma/ib_cache.h>
0023 #include <rdma/ib_addr.h>
0024 #include <crypto/hash.h>
0025
0026 #include "rxe_net.h"
0027 #include "rxe_opcode.h"
0028 #include "rxe_hdr.h"
0029 #include "rxe_param.h"
0030 #include "rxe_verbs.h"
0031 #include "rxe_loc.h"
0032
0033
0034
0035
0036
0037 #define RXE_UVERBS_ABI_VERSION 2
0038
0039 #define RXE_ROCE_V2_SPORT (0xc000)
0040
0041 void rxe_set_mtu(struct rxe_dev *rxe, unsigned int dev_mtu);
0042
0043 int rxe_add(struct rxe_dev *rxe, unsigned int mtu, const char *ibdev_name);
0044
0045 void rxe_rcv(struct sk_buff *skb);
0046
0047
0048 static inline struct rxe_dev *rxe_get_dev_from_net(struct net_device *ndev)
0049 {
0050 struct ib_device *ibdev =
0051 ib_device_get_by_netdev(ndev, RDMA_DRIVER_RXE);
0052
0053 if (!ibdev)
0054 return NULL;
0055 return container_of(ibdev, struct rxe_dev, ib_dev);
0056 }
0057
0058 void rxe_port_up(struct rxe_dev *rxe);
0059 void rxe_port_down(struct rxe_dev *rxe);
0060 void rxe_set_port_state(struct rxe_dev *rxe);
0061
0062 #endif