pdump: replace constant for device name size
The device string has an existing size in rte_dev.h use that instead of defining our own. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
f82067c4d5
commit
2d30d42c0f
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include "rte_pdump.h"
|
#include "rte_pdump.h"
|
||||||
|
|
||||||
#define DEVICE_ID_SIZE 64
|
|
||||||
|
|
||||||
RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
|
RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
|
||||||
|
|
||||||
/* Macro for printing using RTE_LOG */
|
/* Macro for printing using RTE_LOG */
|
||||||
@ -39,14 +37,14 @@ struct pdump_request {
|
|||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
union pdump_data {
|
union pdump_data {
|
||||||
struct enable_v1 {
|
struct enable_v1 {
|
||||||
char device[DEVICE_ID_SIZE];
|
char device[RTE_DEV_NAME_MAX_LEN];
|
||||||
uint16_t queue;
|
uint16_t queue;
|
||||||
struct rte_ring *ring;
|
struct rte_ring *ring;
|
||||||
struct rte_mempool *mp;
|
struct rte_mempool *mp;
|
||||||
void *filter;
|
void *filter;
|
||||||
} en_v1;
|
} en_v1;
|
||||||
struct disable_v1 {
|
struct disable_v1 {
|
||||||
char device[DEVICE_ID_SIZE];
|
char device[RTE_DEV_NAME_MAX_LEN];
|
||||||
uint16_t queue;
|
uint16_t queue;
|
||||||
struct rte_ring *ring;
|
struct rte_ring *ring;
|
||||||
struct rte_mempool *mp;
|
struct rte_mempool *mp;
|
||||||
@ -485,9 +483,8 @@ rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
|
|||||||
struct rte_mempool *mp,
|
struct rte_mempool *mp,
|
||||||
void *filter)
|
void *filter)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
int ret = 0;
|
char name[RTE_DEV_NAME_MAX_LEN];
|
||||||
char name[DEVICE_ID_SIZE];
|
|
||||||
|
|
||||||
ret = pdump_validate_port(port, name);
|
ret = pdump_validate_port(port, name);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -531,7 +528,7 @@ int
|
|||||||
rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags)
|
rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char name[DEVICE_ID_SIZE];
|
char name[RTE_DEV_NAME_MAX_LEN];
|
||||||
|
|
||||||
ret = pdump_validate_port(port, name);
|
ret = pdump_validate_port(port, name);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user