+/** Offload IP checksum in csum forward engine */
+#define TESTPMD_TX_OFFLOAD_IP_CKSUM 0x0001
+/** Offload UDP checksum in csum forward engine */
+#define TESTPMD_TX_OFFLOAD_UDP_CKSUM 0x0002
+/** Offload TCP checksum in csum forward engine */
+#define TESTPMD_TX_OFFLOAD_TCP_CKSUM 0x0004
+/** Offload SCTP checksum in csum forward engine */
+#define TESTPMD_TX_OFFLOAD_SCTP_CKSUM 0x0008
+/** Offload outer IP checksum in csum forward engine for recognized tunnels */
+#define TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM 0x0010
+/** Parse tunnel in csum forward engine. If set, dissect tunnel headers
+ * of rx packets. If not set, treat inner headers as payload. */
+#define TESTPMD_TX_OFFLOAD_PARSE_TUNNEL 0x0020
+/** Insert VLAN header in forward engine */
+#define TESTPMD_TX_OFFLOAD_INSERT_VLAN 0x0040
+/** Insert double VLAN header in forward engine */
+#define TESTPMD_TX_OFFLOAD_INSERT_QINQ 0x0080
+/** Offload MACsec in forward engine */
+#define TESTPMD_TX_OFFLOAD_MACSEC 0x0100
+
+/** Descriptor for a single flow. */
+struct port_flow {
+ size_t size; /**< Allocated space including data[]. */
+ struct port_flow *next; /**< Next flow in list. */
+ struct port_flow *tmp; /**< Temporary linking. */
+ uint32_t id; /**< Flow rule ID. */
+ struct rte_flow *flow; /**< Opaque flow object returned by PMD. */
+ struct rte_flow_attr attr; /**< Attributes. */
+ struct rte_flow_item *pattern; /**< Pattern. */
+ struct rte_flow_action *actions; /**< Actions. */
+ uint8_t data[]; /**< Storage for pattern/actions. */
+};
+
+#ifdef TM_MODE
+/**
+ * Soft port tm related parameters
+ */
+struct softnic_port_tm {
+ uint32_t default_hierarchy_enable; /**< def hierarchy enable flag */
+ uint32_t hierarchy_config; /**< set to 1 if hierarchy configured */
+
+ uint32_t n_subports_per_port; /**< Num of subport nodes per port */
+ uint32_t n_pipes_per_subport; /**< Num of pipe nodes per subport */
+
+ uint64_t tm_pktfield0_slabpos; /**< Pkt field position for subport */
+ uint64_t tm_pktfield0_slabmask; /**< Pkt field mask for the subport */
+ uint64_t tm_pktfield0_slabshr;
+ uint64_t tm_pktfield1_slabpos; /**< Pkt field position for the pipe */
+ uint64_t tm_pktfield1_slabmask; /**< Pkt field mask for the pipe */
+ uint64_t tm_pktfield1_slabshr;
+ uint64_t tm_pktfield2_slabpos; /**< Pkt field position table index */
+ uint64_t tm_pktfield2_slabmask; /**< Pkt field mask for tc table idx */
+ uint64_t tm_pktfield2_slabshr;
+ uint64_t tm_tc_table[64]; /**< TC translation table */
+};
+
+/**
+ * The data structure associate with softnic port
+ */
+struct softnic_port {
+ unsigned int tm_flag; /**< set to 1 if tm feature is enabled */
+ struct softnic_port_tm tm; /**< softnic port tm parameters */
+};
+#endif
+