e1000: igb and em1000 PCI Port Hotplug changes
RFC PATCH v3 1/1 e1000: igb and em1000 PCI Port Hotplug changes
This patch depends on the Port Hotplug Framework. It implements the eth_dev_uninit functions for rte_em_pmd, rte_igb_pmd and rte_igbvf_pmd.
Changes in V3:
Add igb_adapter_stopped and em_adapter_stopped booleans. Release rx and tx queues
Changes in V2:
Call dev_close() from dev_uninit() functions. Remove input parameter checking from dev_uninit() functions.
Signed-off-by Bernard Iremonger <[email protected]>
--- drivers/net/e1000/e1000_ethdev.h | 4 +- drivers/net/e1000/em_ethdev.c | 50 ++++++++++++++++++++++- drivers/net/e1000/igb_ethdev.c | 85 +++++++++++++++++++++++++++++++++++++- drivers/net/e1000/igb_pf.c | 22 ++++++++++ 4 files changed, 157 insertions(+), 4 deletions(-)
drivers/net/e1000/e1000_ethdev.h +3 -1
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -337,4 +337,6 @@ uint16_t eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,uint16_t eth_em_recv_scattered_pkts (void *rx_queue,struct rte_mbuf **rx_pkts,uint16_t nb_pkts); +void igb_pf_host_uninit (struct rte_eth_dev *dev); +#endif /* _E1000_ETHDEV_H_ */
drivers/net/e1000/em_ethdev.c +49 -1
86 lines not on this page · raw message
drivers/net/e1000/igb_ethdev.c +83 -2
153 lines not on this page · raw message
drivers/net/e1000/igb_pf.c +22 -0
@@ -127,6 +127,28 @@ void igb_pf_host_init(struct rte_eth_dev *eth_dev)return ; } +void igb_pf_host_uninit (struct rte_eth_dev *dev) +{ +struct e1000_vf_info **vfinfo; +uint16_t vf_num; + +PMD_INIT_FUNC_TRACE (); + + vfinfo =E1000_DEV_PRIVATE_TO_P_VFDATA (dev->data->dev_private); + +RTE_ETH_DEV_SRIOV (dev).active =0 ; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =0 ; +RTE_ETH_DEV_SRIOV (dev).def_vmdq_idx =0 ; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx =0 ; + + vf_num =dev_num_vf (dev); +if (vf_num ==0 ) +return ; + +rte_free (*vfinfo); + *vfinfo =NULL ; +} +#define E1000_RAH_POOLSEL_SHIFT (18)int igb_pf_host_configure (struct rte_eth_dev *eth_dev) {
Signature · 1 line
1.7.4.1