common/sfc_efx/base: replace PCI efsys macros with functions
[dpdk.git] / drivers / common / sfc_efx / base / efx_impl.h
index dfe5f1f..f58586b 100644 (file)
@@ -303,8 +303,8 @@ efx_filter_reconfigure(
 
 #if EFSYS_OPT_TUNNEL
 typedef struct efx_tunnel_ops_s {
-       boolean_t       (*eto_udp_encap_supported)(efx_nic_t *);
        efx_rc_t        (*eto_reconfigure)(efx_nic_t *);
+       void            (*eto_fini)(efx_nic_t *);
 } efx_tunnel_ops_t;
 #endif /* EFSYS_OPT_TUNNEL */
 
@@ -489,9 +489,25 @@ siena_filter_tbl_clear(
 
 #if EFSYS_OPT_TUNNEL
 
+/* State of a UDP tunnel table entry */
+typedef enum efx_tunnel_udp_entry_state_e {
+       EFX_TUNNEL_UDP_ENTRY_ADDED, /* Tunnel addition is requested */
+       EFX_TUNNEL_UDP_ENTRY_REMOVED, /* Tunnel removal is requested */
+       EFX_TUNNEL_UDP_ENTRY_APPLIED, /* Tunnel is applied by HW */
+} efx_tunnel_udp_entry_state_t;
+
+#if EFSYS_OPT_RIVERHEAD
+typedef uint32_t       efx_vnic_encap_rule_handle_t;
+#endif /* EFSYS_OPT_RIVERHEAD */
+
 typedef struct efx_tunnel_udp_entry_s {
        uint16_t                        etue_port; /* host/cpu-endian */
        uint16_t                        etue_protocol;
+       boolean_t                       etue_busy;
+       efx_tunnel_udp_entry_state_t    etue_state;
+#if EFSYS_OPT_RIVERHEAD
+       efx_vnic_encap_rule_handle_t    etue_handle;
+#endif /* EFSYS_OPT_RIVERHEAD */
 } efx_tunnel_udp_entry_t;
 
 typedef struct efx_tunnel_cfg_s {
@@ -1572,6 +1588,7 @@ LIBEFX_INTERNAL
 extern __checkReturn                   efx_rc_t
 efx_pci_config_find_next_ext_cap(
        __in                            efsys_pci_config_t *espcp,
+       __in                            const efx_pci_ops_t *epop,
        __in                            uint16_t cap_id,
        __inout                         size_t *offsetp);
 
@@ -1586,6 +1603,7 @@ LIBEFX_INTERNAL
 extern __checkReturn                   efx_rc_t
 efx_pci_config_next_ext_cap(
        __in                            efsys_pci_config_t *espcp,
+       __in                            const efx_pci_ops_t *epop,
        __inout                         size_t *offsetp);
 
 /*
@@ -1598,6 +1616,7 @@ LIBEFX_INTERNAL
 extern __checkReturn                   efx_rc_t
 efx_pci_find_next_xilinx_cap_table(
        __in                            efsys_pci_config_t *espcp,
+       __in                            const efx_pci_ops_t *epop,
        __inout                         size_t *pci_cap_offsetp,
        __out                           unsigned int *xilinx_tbl_barp,
        __out                           efsys_dma_addr_t *xilinx_tbl_offsetp);
@@ -1613,6 +1632,7 @@ LIBEFX_INTERNAL
 extern __checkReturn                   efx_rc_t
 efx_pci_read_ext_cap_xilinx_table(
        __in                            efsys_pci_config_t *espcp,
+       __in                            const efx_pci_ops_t *epop,
        __in                            size_t cap_offset,
        __out                           unsigned int *barp,
        __out                           efsys_dma_addr_t *offsetp);