On 1/18/2021 9:36 AM, Nalla Pradeep wrote:
Dev start and stop operations are added. To accomplish this internal
functions to enable or disable io queues are incorporated.
Signed-off-by: Nalla Pradeep <pna...@marvell.com>
<...>
+static int
+otx_ep_dev_start(struct rte_eth_dev *eth_dev)
+{
+ struct otx_ep_device *otx_epvf;
+ unsigned int q;
+ int ret;
+
+ otx_epvf = (struct otx_ep_device *)OTX_EP_DEV(eth_dev);
+ /* Enable IQ/OQ for this device */
+ ret = otx_epvf->fn_list.enable_io_queues(otx_epvf);
+ if (ret) {
+ otx_ep_err("IOQ enable failed\n");
+ return ret;
+ }
+
+ for (q = 0; q < otx_epvf->nb_rx_queues; q++) {
+ rte_write32(otx_epvf->droq[q]->nb_desc,
+ otx_epvf->droq[q]->pkts_credit_reg);
+
+ rte_wmb();
+ otx_ep_info("OQ[%d] dbells [%d]\n", q,
+ rte_read32(otx_epvf->droq[q]->pkts_credit_reg));
+ }
+
+ otx_epvf->started = 1;
+
+ rte_wmb();
is this memory barrier required, isn't the one in the loop should be enough? And
no ones seems reading the 'started'.
+ otx_ep_info("dev started\n");
+
+ return 0;
+}
+
<...>