Support packets in flight
[samplevnf.git] / VNFs / DPPD-PROX / task_base.h
index 1327a6c..89e5bb9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-// Copyright (c) 2010-2017 Intel Corporation
+// Copyright (c) 2010-2020 Intel Corporation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@
 #define TASK_FP_HANDLE_ARP             0x0040
 #define TASK_TX_CRC                    0x0080
 #define TASK_L3                        0x0100
+#define TASK_DO_NOT_FWD_GENEVE         0x0200
 
 // flag_features 64 bits
 #define TASK_FEATURE_ROUTING           0x0001
 #define TASK_FEATURE_LUT_QINQ_RSS              0x2000
 #define TASK_FEATURE_LUT_QINQ_HASH             0x4000
 #define TASK_FEATURE_RX_ALL                    0x8000
-#define TASK_MULTIPLE_MAC                      0x10000
+#define TASK_FEATURE_TXQ_FLAGS_MULTIPLE_MEMPOOL        0x20000
 
-#define FLAG_TX_FLUSH                  0x01
-#define FLAG_NEVER_FLUSH               0x02
+#define TBASE_FLAG_TX_FLUSH             0x01
+#define TBASE_FLAG_NEVER_FLUSH          0x02
 // Task specific flags
-#define BASE_FLAG_LUT_QINQ_HASH        0x08
-#define BASE_FLAG_LUT_QINQ_RSS         0x10
+#define TBASE_FLAG_LUT_QINQ_HASH               0x08
+#define TBASE_FLAG_LUT_QINQ_RSS        0x10
 
 #define OUT_DISCARD 0xFF
 #define OUT_HANDLED 0xFE
@@ -173,10 +174,12 @@ struct task_base_aux {
        int (*tx_pkt_hw)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts, uint8_t *out);
        uint16_t (*tx_pkt_try)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts);
        void (*stop)(struct task_base *tbase);
+       int (*tx_ctrlplane_pkt)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts, uint8_t *out);
        void (*start)(struct task_base *tbase);
        void (*stop_last)(struct task_base *tbase);
        void (*start_first)(struct task_base *tbase);
        struct task_rt_dump task_rt_dump;
+       struct rte_mbuf *mbuf;
 };
 
 /* The task_base is accessed for _all_ task types. In case
@@ -207,7 +210,6 @@ struct task_base {
                struct tx_params_hw_sw tx_params_hw_sw;
        };
        struct l3_base l3;
-       uint32_t local_ipv4;
 } __attribute__((packed)) __rte_cache_aligned;
 
 static void task_base_add_rx_pkt_function(struct task_base *tbase, rx_pkt_func to_add)