Skip to content

Commit

Permalink
octep_cp_lib: Default USE_PEM_AND_DPI_PF defines in headers
Browse files Browse the repository at this point in the history
Use default USE_PEM_AND_DPI_PF defines in the interface header files
instead of the library Makefile. This allows applications using the
library, and not using the VFIO solution, use default macros to disable
it

Signed-off-by: Shinas Rasheed <[email protected]>
Change-Id: I27c11a529b6c6f8cccdd760cb5d171921d4c7795
  • Loading branch information
shinas-marvell authored and GaniHaseeb committed Jul 31, 2024
1 parent a359408 commit abf9795
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions target/libs/octep_cp_lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ LIB_CFLAGS = $(CFLAGS) -O3 -Werror -Wall -Wundef -fPIC -g \

LIB_LDFLAGS = $(LDFLAGS) -shared -fvisibility=hidden

ifeq (,$(findstring USE_PEM_AND_DPI_PF,$(CFLAGS)))
LIB_CFLAGS += -DUSE_PEM_AND_DPI_PF=0
endif

SRCS = main.c
SRCS += soc/soc.c soc/cnxk.c
SRCS += soc/octep_ctrl_mbox.c
Expand Down
4 changes: 4 additions & 0 deletions target/libs/octep_cp_lib/compat/aarch64/cp_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include <stdlib.h>
#include <string.h>

#ifndef USE_PEM_AND_DPI_PF
#define USE_PEM_AND_DPI_PF 0
#endif

#define CP_ETHER_ADDR_LEN 6 /**< Length of Ethernet address. */
#define CP_ETHER_GROUP_ADDR 0x01 /**< Mcast or bcast Eth. addr. */
#define CP_ETHER_LOCAL_ADMIN_ADDR 0x02 /**< Locally assigned Eth. addr. */
Expand Down
4 changes: 4 additions & 0 deletions target/libs/octep_cp_lib/include/octep_cp_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#define BIT_ULL(nr) (1ULL << (nr))
#endif

#ifndef USE_PEM_AND_DPI_PF
#define USE_PEM_AND_DPI_PF 0
#endif

#define OCTEP_CP_VERSION(a, b, c) (((a & 0xff) << 16) + \
((b & 0xff) << 8) + \
(c & 0xff))
Expand Down

0 comments on commit abf9795

Please sign in to comment.