net/sfc/base: handle manual and auto filter clashes in EF10
[dpdk.git] / drivers / net / sfc / base / efx_impl.h
index 6a8fee8..9755f4d 100644 (file)
@@ -246,12 +246,31 @@ typedef struct efx_phy_ops_s {
 } efx_phy_ops_t;
 
 #if EFSYS_OPT_FILTER
+
+/*
+ * Policy for replacing existing filter when inserting a new one.
+ * Note that all policies allow for storing the new lower priority
+ * filters as overridden by existing higher priority ones. It is needed
+ * to restore the lower priority filters on higher priority ones removal.
+ */
+typedef enum efx_filter_replacement_policy_e {
+       /* Cannot replace existing filter */
+       EFX_FILTER_REPLACEMENT_NEVER,
+       /* Higher priority filters can replace lower priotiry ones */
+       EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY,
+       /*
+        * Higher priority filters can replace lower priority ones and
+        * equal priority filters can replace each other.
+        */
+       EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY,
+} efx_filter_replacement_policy_t;
+
 typedef struct efx_filter_ops_s {
        efx_rc_t        (*efo_init)(efx_nic_t *);
        void            (*efo_fini)(efx_nic_t *);
        efx_rc_t        (*efo_restore)(efx_nic_t *);
        efx_rc_t        (*efo_add)(efx_nic_t *, efx_filter_spec_t *,
-                                  boolean_t may_replace);
+                                  efx_filter_replacement_policy_t policy);
        efx_rc_t        (*efo_delete)(efx_nic_t *, efx_filter_spec_t *);
        efx_rc_t        (*efo_supported_filters)(efx_nic_t *, uint32_t *,
                                   size_t, size_t *);
@@ -684,6 +703,12 @@ typedef struct efx_evb_ops_s {
                                                efx_vport_id_t);
        efx_rc_t        (*eeo_vport_assign)(efx_nic_t *, efx_vswitch_id_t,
                                                efx_vport_id_t, uint32_t);
+       efx_rc_t        (*eeo_vport_reconfigure)(efx_nic_t *, efx_vswitch_id_t,
+                                                       efx_vport_id_t,
+                                                       uint16_t *, uint8_t *,
+                                                       boolean_t *);
+       efx_rc_t        (*eeo_vport_stats)(efx_nic_t *, efx_vswitch_id_t,
+                                               efx_vport_id_t, efsys_mem_t *);
 } efx_evb_ops_t;
 
 extern __checkReturn   boolean_t
@@ -706,6 +731,13 @@ typedef struct efx_proxy_ops_s {
        efx_rc_t        (*epo_disable)(efx_nic_t *);
        efx_rc_t        (*epo_privilege_modify)(efx_nic_t *, uint32_t, uint32_t,
                                        uint32_t, uint32_t, uint32_t);
+       efx_rc_t        (*epo_set_privilege_mask)(efx_nic_t *, uint32_t,
+                                       uint32_t, uint32_t);
+       efx_rc_t        (*epo_complete_request)(efx_nic_t *, uint32_t,
+                                       uint32_t, uint32_t);
+       efx_rc_t        (*epo_exec_cmd)(efx_nic_t *, efx_proxy_cmd_params_t *);
+       efx_rc_t        (*epo_get_privilege_mask)(efx_nic_t *, uint32_t,
+                                       uint32_t, uint32_t *);
 } efx_proxy_ops_t;
 
 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
@@ -1349,6 +1381,14 @@ struct efx_mac_stats_range {
        efx_mac_stat_t          last;
 };
 
+typedef enum efx_stats_action_e {
+       EFX_STATS_CLEAR,
+       EFX_STATS_UPLOAD,
+       EFX_STATS_ENABLE_NOEVENTS,
+       EFX_STATS_ENABLE_EVENTS,
+       EFX_STATS_DISABLE,
+} efx_stats_action_t;
+
 extern                                 efx_rc_t
 efx_mac_stats_mask_add_ranges(
        __inout_bcount(mask_size)       uint32_t *maskp,
@@ -1356,6 +1396,14 @@ efx_mac_stats_mask_add_ranges(
        __in_ecount(rng_count)          const struct efx_mac_stats_range *rngp,
        __in                            unsigned int rng_count);
 
+extern __checkReturn   efx_rc_t
+efx_mcdi_mac_stats(
+       __in            efx_nic_t *enp,
+       __in            uint32_t vport_id,
+       __in_opt        efsys_mem_t *esmp,
+       __in            efx_stats_action_t action,
+       __in            uint16_t period_ms);
+
 #endif /* EFSYS_OPT_MAC_STATS */
 
 #ifdef __cplusplus