net/sfc: avoid unnecessary actions on dummy default MAC set
[dpdk.git] / drivers / net / nfp / nfpcore / nfp_cpp.h
index 7e86214..1427954 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef __NFP_CPP_H__
 #define __NFP_CPP_H__
 
+#include <rte_ethdev_pci.h>
+
 #include "nfp-common/nfp_platform.h"
 #include "nfp-common/nfp_resid.h"
 
@@ -31,6 +33,8 @@ struct nfp_cpp {
         * island XPB CSRs.
         */
        uint32_t imb_cat_table[16];
+
+       int driver_lock_needed;
 };
 
 /*
@@ -52,7 +56,7 @@ struct nfp_cpp_operations {
        size_t area_priv_size;
 
        /* Instance an NFP CPP */
-       int (*init)(struct nfp_cpp *cpp, const char *devname);
+       int (*init)(struct nfp_cpp *cpp, struct rte_pci_device *dev);
 
        /*
         * Free the bus.
@@ -179,7 +183,8 @@ uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp);
  *
  * @return NFP CPP handle, or NULL on failure (and set errno accordingly).
  */
-struct nfp_cpp *nfp_cpp_from_device_name(const char *devname);
+struct nfp_cpp *nfp_cpp_from_device_name(struct rte_pci_device *dev,
+                                        int driver_lock_needed);
 
 /*
  * Free a NFP CPP handle