net/i40e: add outer VLAN processing
[dpdk.git] / drivers / net / softnic / rte_eth_softnic_thread.c
index a8c26a5..ec8bef4 100644 (file)
@@ -29,11 +29,9 @@ softnic_thread_free(struct pmd_internals *softnic)
                struct softnic_thread *t = &softnic->thread[i];
 
                /* MSGQs */
-               if (t->msgq_req)
-                       rte_ring_free(t->msgq_req);
+               rte_ring_free(t->msgq_req);
 
-               if (t->msgq_rsp)
-                       rte_ring_free(t->msgq_rsp);
+               rte_ring_free(t->msgq_rsp);
        }
 }
 
@@ -129,14 +127,12 @@ thread_sc_service_up(struct pmd_internals *softnic, uint32_t thread_id)
        struct softnic_thread *t = &softnic->thread[thread_id];
        struct rte_eth_dev *dev;
        int status;
-       uint16_t port_id;
 
        /* service params */
-       status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
-       if (status)
-               return status;
+       dev = rte_eth_dev_get_by_name(softnic->params.name);
+       if (!dev)
+               return -EINVAL;
 
-       dev = &rte_eth_devices[port_id];
        snprintf(service_params.name, sizeof(service_params.name), "%s_%u",
                softnic->params.name,
                thread_id);