This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 022cf4a7136c7369ee5f29f5d245ac8d052135e6 (commit) from c87d5cc8d70e6e4291d18b101882ea2ddded236e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 022cf4a7136c7369ee5f29f5d245ac8d052135e6 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Sat Feb 4 23:33:24 2017 +0300
linux-gen: fix dpdk pktio init
struct rte_eth_dev_info should be initialized before usage with strcmp(dev_info.driver_name, "rte_ixgbe_pmd"). Patch fixes segfault on that compare.
CC: Elo Matias matias.elo@nokia.com Reviewed-and-tested-by: Matias Elo matias.elo@nokia.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 0eb025a..9a9f7a4 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -560,19 +560,19 @@ static int dpdk_output_queues_config(pktio_entry_t *pktio_entry, return 0; }
-static void dpdk_init_capability(pktio_entry_t *pktio_entry) +static void dpdk_init_capability(pktio_entry_t *pktio_entry, + struct rte_eth_dev_info *dev_info) { pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk; odp_pktio_capability_t *capa = &pkt_dpdk->capa; - struct rte_eth_dev_info dev_info;
- memset(&dev_info, 0, sizeof(struct rte_eth_dev_info)); + memset(dev_info, 0, sizeof(struct rte_eth_dev_info)); memset(capa, 0, sizeof(odp_pktio_capability_t));
- rte_eth_dev_info_get(pkt_dpdk->port_id, &dev_info); - capa->max_input_queues = RTE_MIN(dev_info.max_rx_queues, + rte_eth_dev_info_get(pkt_dpdk->port_id, dev_info); + capa->max_input_queues = RTE_MIN(dev_info->max_rx_queues, PKTIO_MAX_QUEUES); - capa->max_output_queues = RTE_MIN(dev_info.max_tx_queues, + capa->max_output_queues = RTE_MIN(dev_info->max_tx_queues, PKTIO_MAX_QUEUES); capa->set_op.op.promisc_mode = 1;
@@ -631,7 +631,7 @@ static int dpdk_open(odp_pktio_t id ODP_UNUSED, return -1; }
- dpdk_init_capability(pktio_entry); + dpdk_init_capability(pktio_entry, &dev_info);
mtu = dpdk_mtu_get(pktio_entry); if (mtu == 0) {
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/pktio/dpdk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive