Skip to content

Commit

Permalink
vmw_pvrdma: Add sparse annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Adit Ranadive <aditr@vmware.com>
Acked-by: Adit Ranadive <aditr@vmware.com>
  • Loading branch information
jgunthorpe committed Jul 20, 2017
1 parent 50248f6 commit 748b819
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ add_subdirectory(providers/mthca)
add_subdirectory(providers/nes) # NO SPARSE
add_subdirectory(providers/ocrdma)
add_subdirectory(providers/qedr)
add_subdirectory(providers/vmw_pvrdma) # NO SPARSE
add_subdirectory(providers/vmw_pvrdma)
endif()

add_subdirectory(providers/hfi1verbs)
Expand Down
6 changes: 3 additions & 3 deletions providers/vmw_pvrdma/pvrdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct pvrdma_qp {
struct pvrdma_buf sbuf;
int max_inline_data;
int buf_size;
uint32_t sq_signal_bits;
__be32 sq_signal_bits;
int sq_spare_wqes;
struct pvrdma_wq sq;
struct pvrdma_wq rq;
Expand Down Expand Up @@ -210,12 +210,12 @@ static inline struct pvrdma_ah *to_vah(struct ibv_ah *ibah)

static inline void pvrdma_write_uar_qp(void *uar, unsigned value)
{
*(uint32_t *)(uar + PVRDMA_UAR_QP_OFFSET) = htole32(value);
*(__le32 *)(uar + PVRDMA_UAR_QP_OFFSET) = htole32(value);
}

static inline void pvrdma_write_uar_cq(void *uar, unsigned value)
{
*(uint32_t *)(uar + PVRDMA_UAR_CQ_OFFSET) = htole32(value);
*(__le32 *)(uar + PVRDMA_UAR_CQ_OFFSET) = htole32(value);
}

static inline int ibv_send_flags_to_pvrdma(int flags)
Expand Down
7 changes: 1 addition & 6 deletions providers/vmw_pvrdma/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,7 @@ static int is_multicast_gid(const union ibv_gid *gid)

static int is_link_local_gid(const union ibv_gid *gid)
{
uint32_t *hi = (uint32_t *)(gid->raw);
uint32_t *lo = (uint32_t *)(gid->raw + 4);
if (hi[0] == htobe32(0xfe800000) && lo[0] == 0)
return 1;

return 0;
return gid->global.subnet_prefix == htobe64(0xfe80000000000000ULL);
}

static int is_ipv6_addr_v4mapped(const struct in6_addr *a)
Expand Down

0 comments on commit 748b819

Please sign in to comment.