X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fdpaa%2Fdpaa_ethdev.c;h=6716dd0cf3ae87e0fe4a1757661069957b66b46c;hb=538da7a1cad25fbdffe298c8ca76fc4dbd262d1b;hp=ba66aa2a0b0afc22288e2145d48cd36d0165378c;hpb=ec503d8fa78249d9d72fd874299b8be124b48a55;p=dpdk.git diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index ba66aa2a0b..6716dd0cf3 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -439,10 +440,9 @@ dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev, if (xstats_names != NULL) for (i = 0; i < stat_cnt; i++) - snprintf(xstats_names[i].name, - sizeof(xstats_names[i].name), - "%s", - dpaa_xstats_strings[i].name); + strlcpy(xstats_names[i].name, + dpaa_xstats_strings[i].name, + sizeof(xstats_names[i].name)); return stat_cnt; } @@ -673,6 +673,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, rxq->is_static = true; } + rxq->bp_array = rte_dpaa_bpid_info; dev->data->rx_queues[queue_idx] = rxq; /* configure the CGR size as per the desc size */ @@ -933,7 +934,7 @@ dpaa_flow_ctrl_get(struct rte_eth_dev *dev, static int dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, - struct ether_addr *addr, + struct rte_ether_addr *addr, uint32_t index, __rte_unused uint32_t pool) { @@ -963,7 +964,7 @@ dpaa_dev_remove_mac_addr(struct rte_eth_dev *dev, static int dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, - struct ether_addr *addr) + struct rte_ether_addr *addr) { int ret; struct dpaa_if *dpaa_intf = dev->data->dev_private; @@ -1225,11 +1226,17 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); + dpaa_intf = eth_dev->data->dev_private; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) { eth_dev->dev_ops = &dpaa_devops; /* Plugging of UCODE burst API not supported in Secondary */ eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; + eth_dev->tx_pkt_burst = dpaa_eth_queue_tx; +#ifdef CONFIG_FSL_QMAN_FQ_LOOKUP + qman_set_fq_lookup_table( + dpaa_intf->rx_queues->qman_fq_lookup_table); +#endif return 0; } @@ -1347,7 +1354,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) /* reset bpool list, initialize bpool dynamically */ list_for_each_entry_safe(bp, tmp_bp, &cfg->fman_if->bpool_list, node) { list_del(&bp->node); - free(bp); + rte_free(bp); } /* Populate ethdev structure */ @@ -1367,7 +1374,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) } /* copy the primary mac address */ - ether_addr_copy(&fman_intf->mac_addr, ð_dev->data->mac_addrs[0]); + rte_ether_addr_copy(&fman_intf->mac_addr, ð_dev->data->mac_addrs[0]); RTE_LOG(INFO, PMD, "net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n", dpaa_device->name,