mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
IB/core: Add raw packet protocol
Define raw packet protocol which comes to denote this port supports working with raw ethernet frames, e.g as done with RAW_PACKET QPs. Signed-off-by: Or Gerlitz <[email protected]> Reviewed-by: Matan Barak <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
81713d3788
commit
aa773bd495
1 changed files with 8 additions and 0 deletions
|
|
@ -489,6 +489,7 @@ static inline struct rdma_hw_stats *rdma_alloc_hw_stats_struct(
|
|||
#define RDMA_CORE_CAP_PROT_ROCE 0x00200000
|
||||
#define RDMA_CORE_CAP_PROT_IWARP 0x00400000
|
||||
#define RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP 0x00800000
|
||||
#define RDMA_CORE_CAP_PROT_RAW_PACKET 0x01000000
|
||||
|
||||
#define RDMA_CORE_PORT_IBA_IB (RDMA_CORE_CAP_PROT_IB \
|
||||
| RDMA_CORE_CAP_IB_MAD \
|
||||
|
|
@ -512,6 +513,8 @@ static inline struct rdma_hw_stats *rdma_alloc_hw_stats_struct(
|
|||
#define RDMA_CORE_PORT_INTEL_OPA (RDMA_CORE_PORT_IBA_IB \
|
||||
| RDMA_CORE_CAP_OPA_MAD)
|
||||
|
||||
#define RDMA_CORE_PORT_RAW_PACKET (RDMA_CORE_CAP_PROT_RAW_PACKET)
|
||||
|
||||
struct ib_port_attr {
|
||||
u64 subnet_prefix;
|
||||
enum ib_port_state state;
|
||||
|
|
@ -2342,6 +2345,11 @@ static inline bool rdma_ib_or_roce(const struct ib_device *device, u8 port_num)
|
|||
rdma_protocol_roce(device, port_num);
|
||||
}
|
||||
|
||||
static inline bool rdma_protocol_raw_packet(const struct ib_device *device, u8 port_num)
|
||||
{
|
||||
return device->port_immutable[port_num].core_cap_flags & RDMA_CORE_CAP_PROT_RAW_PACKET;
|
||||
}
|
||||
|
||||
/**
|
||||
* rdma_cap_ib_mad - Check if the port of a device supports Infiniband
|
||||
* Management Datagrams.
|
||||
|
|
|
|||
Loading…
Reference in a new issue