Skip to content

Commit

Permalink
napatech fix minor proto issue
Browse files Browse the repository at this point in the history
Signed-off-by: Hanoh Haim <[email protected]>
  • Loading branch information
hhaim committed Apr 21, 2020
1 parent 6db5cb4 commit 0bde35c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/dpdk/drivers/net/ntacc/rte_eth_ntacc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ static int eth_dev_configure(struct rte_eth_dev *dev)
return 0;
}

static void eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
static int eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
{
struct pmd_internals *internals = dev->data->dev_private;
NtInfoStream_t hInfo;
Expand Down Expand Up @@ -1108,22 +1108,22 @@ static void eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_i
pInfo = (NtInfo_t *)rte_malloc(internals->name, sizeof(NtInfo_t), 0);
if (!pInfo) {
_log_out_of_memory_errors(__func__);
return;
return 0;
}

// Read speed capabilities for the port
if ((status = (*_NT_InfoOpen)(&hInfo, "DPDK Info stream")) != NT_SUCCESS) {
_log_nt_errors(status, "NT_InfoOpen failed", __func__, __LINE__);
rte_free(pInfo);
return;
return 0;
}

pInfo->cmd = NT_INFO_CMD_READ_PORT_V8;
pInfo->u.port_v8.portNo = (uint8_t)(internals->txq[0].port);
if ((status = (*_NT_InfoRead)(hInfo, pInfo)) != 0) {
_log_nt_errors(status, "NT_InfoRead failed", __func__, __LINE__);
rte_free(pInfo);
return;
return 0;
}
(void)(*_NT_InfoClose)(hInfo);

Expand Down Expand Up @@ -1151,6 +1151,7 @@ static void eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_i
dev_info->speed_capa |= ETH_LINK_SPEED_50G;
}
rte_free(pInfo);
return (0);
}

#ifdef USE_SW_STAT
Expand Down Expand Up @@ -1260,7 +1261,7 @@ static void eth_stats_reset(struct rte_eth_dev *dev)
}
}
#else
static void eth_stats_reset(struct rte_eth_dev *dev)
static int eth_stats_reset(struct rte_eth_dev *dev)
{
struct pmd_internals *internals = dev->data->dev_private;
int status;
Expand All @@ -1269,7 +1270,7 @@ static void eth_stats_reset(struct rte_eth_dev *dev)
pStatData = (NtStatistics_t *)rte_malloc(internals->name, sizeof(NtStatistics_t), 0);
if (!pStatData) {
_log_out_of_memory_errors(__func__);
return;
return 0;
}

pStatData->cmd = NT_STATISTICS_READ_CMD_QUERY_V2;
Expand All @@ -1280,10 +1281,11 @@ static void eth_stats_reset(struct rte_eth_dev *dev)
NTACC_UNLOCK(&internals->statlock);
_log_nt_errors(status, "NT_StatRead failed", __func__, __LINE__);
rte_free(pStatData);
return;
return 0;
}
NTACC_UNLOCK(&internals->statlock);
rte_free(pStatData);
return 0;
}
#endif

Expand Down

0 comments on commit 0bde35c

Please sign in to comment.