Skip to content

Commit

Permalink
efa: Move EFA_GET/SET() to efa.h
Browse files Browse the repository at this point in the history
The EFA_GET/SET() macros are better suited in efa.h file.

Signed-off-by: Gal Pressman <galpress@amazon.com>
  • Loading branch information
gal-pressman committed Dec 31, 2020
1 parent 47decc8 commit 606778b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions providers/efa/efa.h
Expand Up @@ -16,6 +16,12 @@
#include "efa-abi.h"
#include "efa_io_defs.h"

#define EFA_GET(ptr, type) \
((*(ptr) & type##_MASK) >> type##_SHIFT)

#define EFA_SET(ptr, type, value) \
({ *(ptr) |= ((value) << type##_SHIFT) & type##_MASK; })

struct efa_context {
struct verbs_context ibvctx;
uint32_t cmds_supp_udata_mask;
Expand Down
6 changes: 0 additions & 6 deletions providers/efa/efa_io_defs.h
Expand Up @@ -6,12 +6,6 @@
#ifndef _EFA_IO_H_
#define _EFA_IO_H_

#define EFA_GET(ptr, type) \
((*(ptr) & type##_MASK) >> type##_SHIFT)

#define EFA_SET(ptr, type, value) \
({ *(ptr) |= ((value) << type##_SHIFT) & type##_MASK; })

#define EFA_IO_TX_DESC_NUM_BUFS 2
#define EFA_IO_TX_DESC_NUM_RDMA_BUFS 1
#define EFA_IO_TX_DESC_INLINE_MAX_SIZE 32
Expand Down

0 comments on commit 606778b

Please sign in to comment.