diff options
author | Damjan Marion <damarion@cisco.com> | 2018-04-17 19:26:31 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-04-17 20:13:17 +0000 |
commit | 89b16e66a4f3df9c3851702a3d186947ed377f82 (patch) | |
tree | 73e3b45857b7f6da187427e00c7730351f4e0ba7 /src/plugins/dpdk/device/dpdk.h | |
parent | 669d07dc016757b856e1014a415996cf9f0ebc58 (diff) |
dpdk: print device flags in the 'show hardware' output
Change-Id: I0d10f13a56420b119fdfad97dcc135b245c269e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/dpdk.h')
-rw-r--r-- | src/plugins/dpdk/device/dpdk.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h index 1f43a484224..d52e96634e2 100644 --- a/src/plugins/dpdk/device/dpdk.h +++ b/src/plugins/dpdk/device/dpdk.h @@ -152,6 +152,26 @@ typedef struct u32 flush_count; } dpdk_device_hqos_per_hqos_thread_t; +#define foreach_dpdk_device_flags \ + _( 0, ADMIN_UP, "admin-up") \ + _( 1, PROMISC, "promisc") \ + _( 2, PMD, "pmd") \ + _( 3, PMD_INIT_FAIL, "pmd-init-fail") \ + _( 4, MAYBE_MULTISEG, "maybe-multiseg") \ + _( 5, HAVE_SUBIF, "subif") \ + _( 6, HQOS, "hqos") \ + _( 7, BOND_SLAVE, "bond-slave") \ + _( 8, BOND_SLAVE_UP, "bond-slave-up") \ + _( 9, TX_OFFLOAD, "tx-offload") \ + _(10, INTEL_PHDR_CKSUM, "intel-phdr-cksum") \ + +enum +{ +#define _(a, b, c) DPDK_DEVICE_FLAG_##b = (1 << a), + foreach_dpdk_device_flags +#undef _ +}; + typedef struct { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); @@ -174,17 +194,6 @@ typedef struct i8 cpu_socket; u16 flags; -#define DPDK_DEVICE_FLAG_ADMIN_UP (1 << 0) -#define DPDK_DEVICE_FLAG_PROMISC (1 << 1) -#define DPDK_DEVICE_FLAG_PMD (1 << 2) -#define DPDK_DEVICE_FLAG_PMD_INIT_FAIL (1 << 3) -#define DPDK_DEVICE_FLAG_MAYBE_MULTISEG (1 << 4) -#define DPDK_DEVICE_FLAG_HAVE_SUBIF (1 << 5) -#define DPDK_DEVICE_FLAG_HQOS (1 << 6) -#define DPDK_DEVICE_FLAG_BOND_SLAVE (1 << 7) -#define DPDK_DEVICE_FLAG_BOND_SLAVE_UP (1 << 8) -#define DPDK_DEVICE_FLAG_TX_OFFLOAD (1 << 9) -#define DPDK_DEVICE_FLAG_INTEL_PHDR_CKSUM (1 << 10) u16 nb_tx_desc; CLIB_CACHE_LINE_ALIGN_MARK (cacheline1); |