net: add rte prefix to ether structures
[dpdk.git] / lib / librte_pipeline / rte_table_action.h
index c960612..ef45a30 100644 (file)
@@ -202,7 +202,7 @@ struct rte_table_action_dscp_table_entry {
        /** Packet color. Used by the meter action as the packet input color
         * for the color aware mode of the traffic metering algorithm.
         */
-       enum rte_meter_color color;
+       enum rte_color color;
 };
 
 /** DSCP translation table. */
@@ -259,7 +259,7 @@ struct rte_table_action_mtr_tc_params {
        uint32_t meter_profile_id;
 
        /** Policer actions. */
-       enum rte_table_action_policer policer[e_RTE_METER_COLORS];
+       enum rte_table_action_policer policer[RTE_COLORS];
 };
 
 /** Meter action statistics counters per traffic class. */
@@ -268,13 +268,13 @@ struct rte_table_action_mtr_counters_tc {
         * and before the policer actions are executed. Only valid when
         * *n_packets_valid* is non-zero.
         */
-       uint64_t n_packets[e_RTE_METER_COLORS];
+       uint64_t n_packets[RTE_COLORS];
 
        /** Number of packet bytes per color at the output of the traffic
         * metering and before the policer actions are executed. Only valid when
         * *n_bytes_valid* is non-zero.
         */
-       uint64_t n_bytes[e_RTE_METER_COLORS];
+       uint64_t n_bytes[RTE_COLORS];
 
        /** When non-zero, the *n_packets* field is valid. */
        int n_packets_valid;
@@ -380,12 +380,15 @@ enum rte_table_action_encap_type {
         * Ether -> { Ether | VLAN | IP | UDP | VXLAN | Ether }
         */
        RTE_TABLE_ACTION_ENCAP_VXLAN,
+
+       /** IP -> { Ether | S-VLAN | C-VLAN | PPPoE | PPP | IP } */
+       RTE_TABLE_ACTION_ENCAP_QINQ_PPPOE,
 };
 
 /** Pre-computed Ethernet header fields for encapsulation action. */
 struct rte_table_action_ether_hdr {
-       struct ether_addr da; /**< Destination address. */
-       struct ether_addr sa; /**< Source address. */
+       struct rte_ether_addr da; /**< Destination address. */
+       struct rte_ether_addr sa; /**< Source address. */
 };
 
 /** Pre-computed VLAN header fields for encapsulation action. */
@@ -529,6 +532,16 @@ struct rte_table_action_encap_config {
        };
 };
 
+/** QinQ_PPPoE encap parameters. */
+struct rte_table_encap_ether_qinq_pppoe {
+
+       /** Only valid when *type* is set to QinQ. */
+       struct rte_table_action_ether_hdr ether;
+       struct rte_table_action_vlan_hdr svlan; /**< Service VLAN header. */
+       struct rte_table_action_vlan_hdr cvlan; /**< Customer VLAN header. */
+       struct rte_table_action_pppoe_hdr pppoe; /**< PPPoE/PPP headers. */
+};
+
 /** Encap action parameters (per table rule). */
 struct rte_table_action_encap_params {
        /** Encapsulation type. */
@@ -553,6 +566,9 @@ struct rte_table_action_encap_params {
 
                /** Only valid when *type* is set to VXLAN. */
                struct rte_table_action_encap_vxlan_params vxlan;
+
+               /** Only valid when *type* is set to QinQ_PPPoE. */
+               struct rte_table_encap_ether_qinq_pppoe qinq_pppoe;
        };
 };