- /*
- * Shared memory copy of the Tx datapath name to be used by
- * the secondary process to find Tx datapath to be used.
- */
- char *dp_tx_name;
-};
+static inline struct sfc_adapter *
+sfc_adapter_by_eth_dev(struct rte_eth_dev *eth_dev)
+{
+ struct sfc_adapter_priv *sap = sfc_adapter_priv_by_eth_dev(eth_dev);
+
+ SFC_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
+
+ return container_of(sap, struct sfc_adapter, priv);
+}
+
+static inline struct sfc_adapter_shared *
+sfc_sa2shared(struct sfc_adapter *sa)
+{
+ return sa->priv.shared;
+}