net/hns3: fix return value for unsupported tuple
[dpdk.git] / drivers / net / sfc / sfc_mae.h
index 2750fbb..d2995de 100644 (file)
@@ -29,6 +29,7 @@ struct sfc_mae_fw_rsrc {
        union {
                efx_mae_aset_id_t       aset_id;
                efx_mae_rule_id_t       rule_id;
+               efx_mae_mac_id_t        mac_id;
                efx_mae_eh_id_t         eh_id;
        };
 };
@@ -44,6 +45,16 @@ struct sfc_mae_outer_rule {
 
 TAILQ_HEAD(sfc_mae_outer_rules, sfc_mae_outer_rule);
 
+/** MAC address registry entry */
+struct sfc_mae_mac_addr {
+       TAILQ_ENTRY(sfc_mae_mac_addr)   entries;
+       unsigned int                    refcnt;
+       uint8_t                         addr_bytes[EFX_MAC_ADDR_LEN];
+       struct sfc_mae_fw_rsrc          fw_rsrc;
+};
+
+TAILQ_HEAD(sfc_mae_mac_addrs, sfc_mae_mac_addr);
+
 /** Encap. header registry entry */
 struct sfc_mae_encap_header {
        TAILQ_ENTRY(sfc_mae_encap_header)       entries;
@@ -65,10 +76,10 @@ struct sfc_mae_counter_id {
        /* RTE counter ID validity status */
        bool                            rte_id_valid;
 
-       /* Flow Tunnel (FT) GROUP hit counter (or NULL) */
-       uint64_t                        *ft_group_hit_counter;
-       /* Flow Tunnel (FT) context (for JUMP rules; otherwise, NULL) */
-       struct sfc_flow_tunnel          *ft;
+       /* Flow Tunnel (FT) SWITCH hit counter (or NULL) */
+       uint64_t                        *ft_switch_hit_counter;
+       /* Flow Tunnel (FT) context (for TUNNEL rules; otherwise, NULL) */
+       struct sfc_ft_ctx               *ft_ctx;
 };
 
 /** Action set registry entry */
@@ -79,6 +90,8 @@ struct sfc_mae_action_set {
        uint32_t                        n_counters;
        efx_mae_actions_t               *spec;
        struct sfc_mae_encap_header     *encap_header;
+       struct sfc_mae_mac_addr         *dst_mac_addr;
+       struct sfc_mae_mac_addr         *src_mac_addr;
        struct sfc_mae_fw_rsrc          fw_rsrc;
 };
 
@@ -110,7 +123,7 @@ struct sfc_mae_counter {
        union sfc_pkts_bytes            value;
        union sfc_pkts_bytes            reset;
 
-       uint64_t                        *ft_group_hit_counter;
+       uint64_t                        *ft_switch_hit_counter;
 };
 
 struct sfc_mae_counters_xstats {
@@ -211,6 +224,8 @@ struct sfc_mae {
        struct sfc_mae_outer_rules      outer_rules;
        /** Encap. header registry */
        struct sfc_mae_encap_headers    encap_headers;
+       /** MAC address registry */
+       struct sfc_mae_mac_addrs        mac_addrs;
        /** Action set registry */
        struct sfc_mae_action_sets      action_sets;
        /** Encap. header bounce buffer */
@@ -348,12 +363,12 @@ struct sfc_mae_parse_ctx {
        size_t                          tunnel_def_mask_size;
        const void                      *tunnel_def_mask;
        bool                            match_mport_set;
-       enum sfc_flow_tunnel_rule_type  ft_rule_type;
+       enum sfc_ft_rule_type           ft_rule_type;
        struct sfc_mae_pattern_data     pattern_data;
        efx_tunnel_protocol_t           encap_type;
        const struct rte_flow_item      *pattern;
        unsigned int                    priority;
-       struct sfc_flow_tunnel          *ft;
+       struct sfc_ft_ctx               *ft_ctx;
 };
 
 int sfc_mae_attach(struct sfc_adapter *sa);