kni: fix multi-process support
[dpdk.git] / lib / librte_eal / common / include / rte_pci.h
index 99f4de2..1314d20 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -139,10 +139,11 @@ struct rte_pci_device {
        TAILQ_ENTRY(rte_pci_device) next;       /**< Next probed PCI device. */
        struct rte_pci_addr addr;               /**< PCI location. */
        struct rte_pci_id id;                   /**< PCI ID. */
-       struct rte_pci_resource mem_resource;   /**< PCI Memory Resource */
+       struct rte_pci_resource mem_resource[PCI_MAX_RESOURCE];   /**< PCI Memory Resource */
        struct rte_intr_handle intr_handle;     /**< Interrupt handle */
-       char previous_dr[PATH_MAX];             /**< path for pre-dpdk driver*/
        const struct rte_pci_driver *driver;    /**< Associated driver */
+       uint16_t max_vfs;                       /**< sriov enable if not zero */
+       int numa_node;                          /**< NUMA node connection */
        unsigned int blacklisted:1;             /**< Device is blacklisted */
 };
 
@@ -183,16 +184,13 @@ struct rte_pci_driver {
        uint32_t drv_flags;                     /**< Flags contolling handling of device. */
 };
 
-/**< Device needs igb_uio kernel module */
+#ifdef RTE_EAL_UNBIND_PORTS
+/** Device needs igb_uio kernel module */
 #define RTE_PCI_DRV_NEED_IGB_UIO 0x0001
-/**< Device driver must be registered several times until failure */
+#endif
+/** Device driver must be registered several times until failure */
 #define RTE_PCI_DRV_MULTIPLE 0x0002
 
-/**
- * Perform clean up of pci drivers on application exits.
- * */
-void rte_eal_pci_exit(void);
-
 /**
  * Probe the PCI bus for registered drivers.
  *
@@ -220,6 +218,15 @@ void rte_eal_pci_dump(void);
  */
 void rte_eal_pci_register(struct rte_pci_driver *driver);
 
+/**
+ * Unregister a PCI driver.
+ *
+ * @param driver
+ *   A pointer to a rte_pci_driver structure describing the driver
+ *   to be unregistered.
+ */
+void rte_eal_pci_unregister(struct rte_pci_driver *driver);
+
 /**
  * Register a list of PCI locations that will be blacklisted (not used by DPDK).
  *