Skip to content

Commit

Permalink
bnxt_re/lib: Remove unused functions
Browse files Browse the repository at this point in the history
Remove the unused functions as the lib has moved
to the newer helper functions.

Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
  • Loading branch information
selvintxavier committed Mar 12, 2024
1 parent be29172 commit c6b85f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
33 changes: 0 additions & 33 deletions providers/bnxt_re/memory.c
Expand Up @@ -44,39 +44,6 @@

#include "main.h"

int bnxt_re_alloc_aligned(struct bnxt_re_queue *que, uint32_t pg_size)
{
int ret, bytes;

bytes = (que->depth * que->stride);
que->bytes = align(bytes, pg_size);
que->va = mmap(NULL, que->bytes, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (que->va == MAP_FAILED) {
que->bytes = 0;
return errno;
}
/* Touch pages before proceeding. */
memset(que->va, 0, que->bytes);

ret = ibv_dontfork_range(que->va, que->bytes);
if (ret) {
munmap(que->va, que->bytes);
que->bytes = 0;
}

return ret;
}

void bnxt_re_free_aligned(struct bnxt_re_queue *que)
{
if (que->bytes) {
ibv_dofork_range(que->va, que->bytes);
munmap(que->va, que->bytes);
que->bytes = 0;
}
}

void bnxt_re_free_mem(struct bnxt_re_mem *mem)
{
if (mem->va_head) {
Expand Down
2 changes: 0 additions & 2 deletions providers/bnxt_re/memory.h
Expand Up @@ -89,8 +89,6 @@ struct bnxt_re_queue {
uint32_t msn_tbl_sz;
};

int bnxt_re_alloc_aligned(struct bnxt_re_queue *que, uint32_t pg_size);
void bnxt_re_free_aligned(struct bnxt_re_queue *que);

/* Basic queue operation */
static inline void *bnxt_re_get_hwqe(struct bnxt_re_queue *que, uint32_t idx)
Expand Down

0 comments on commit c6b85f4

Please sign in to comment.