summaryrefslogtreecommitdiff
path: root/drivers/net/pcap
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-10-19 04:07:56 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:05 +0200
commit662dbc322d0467e0dcdcbbb2b2283a43a5b849e7 (patch)
tree6a4d08bff092534e7b48dca28a51638bd2bcc44f /drivers/net/pcap
parente16adf08e54d5b1ff3b1116c372bbca279fced9d (diff)
downloaddpdk-next-eventdev-662dbc322d0467e0dcdcbbb2b2283a43a5b849e7.zip
dpdk-next-eventdev-662dbc322d0467e0dcdcbbb2b2283a43a5b849e7.tar.gz
dpdk-next-eventdev-662dbc322d0467e0dcdcbbb2b2283a43a5b849e7.tar.xz
ethdev: remove release function for secondary process
After previous changes, the function rte_eth_dev_release_port() can be used for primary or secondary process as well. The only difference with rte_eth_dev_release_port_secondary() is the shared lock used in rte_eth_dev_release_port(). The function rte_eth_dev_release_port_secondary() was recently added in 18.11 cycle. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'drivers/net/pcap')
-rw-r--r--drivers/net/pcap/rte_eth_pcap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 1790a80..7bbe72e 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1228,13 +1228,13 @@ pmd_pcap_remove(struct rte_vdev_device *dev)
if (eth_dev == NULL)
return -1;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return rte_eth_dev_release_port_secondary(eth_dev);
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ internals = eth_dev->data->dev_private;
+ if (internals != NULL && internals->phy_mac == 0)
+ /* not dynamically allocated, must not be freed */
+ eth_dev->data->mac_addrs = NULL;
+ }
- internals = eth_dev->data->dev_private;
- if (internals != NULL && internals->phy_mac == 0)
- /* not dynamically allocated, must not be freed */
- eth_dev->data->mac_addrs = NULL;
rte_eth_dev_release_port(eth_dev);
return 0;