X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Ftask_base.h;h=df876e9a10d9ea921326ccee138e71ba026dd866;hb=8442f6a8ce0962d818b7cd800150980c65983719;hp=f8c05242b3f530a1b0889c0278134c3e0a5ef474;hpb=0249d9c01370221b724d794a3d048b01a9dd325b;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/task_base.h b/VNFs/DPPD-PROX/task_base.h index f8c05242..df876e9a 100644 --- a/VNFs/DPPD-PROX/task_base.h +++ b/VNFs/DPPD-PROX/task_base.h @@ -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. @@ -44,7 +44,7 @@ #define TASK_FEATURE_NEVER_DISCARDS 0x0008 #define TASK_FEATURE_NO_RX 0x0010 #define TASK_FEATURE_TXQ_FLAGS_NOOFFLOADS 0x0020 -#define TASK_FEATURE_TXQ_FLAGS_NOMULTSEGS 0x0040 +#define TASK_FEATURE_TXQ_FLAGS_MULTSEGS 0x0040 #define TASK_FEATURE_ZERO_RX 0x0080 #define TASK_FEATURE_TXQ_FLAGS_REFCOUNT 0x0100 #define TASK_FEATURE_TSC_RX 0x0200 @@ -53,7 +53,7 @@ #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 @@ -143,6 +143,9 @@ struct task_base; #define MAX_RX_PKT_ALL 16384 +#define RX_BUCKET_SIZE (2 * MAX_RING_BURST + 1) /* Limit RX bucket size */ +#define TX_BUCKET_SIZE (MAX_RING_BURST +1) + #define MAX_STACKED_RX_FUCTIONS 16 typedef uint16_t (*rx_pkt_func) (struct task_base *tbase, struct rte_mbuf ***mbufs); @@ -150,7 +153,6 @@ typedef uint16_t (*rx_pkt_func) (struct task_base *tbase, struct rte_mbuf ***mbu struct task_base_aux { /* Not used when PROX_STATS is not defined */ struct task_rt_stats stats; - struct task_rt_dump task_rt_dump; /* Used if TASK_TSC_RX is enabled*/ struct { @@ -160,20 +162,23 @@ struct task_base_aux { struct rte_mbuf **all_mbufs; - int rx_prev_count; - int rx_prev_idx; + uint16_t rx_prev_count; + uint16_t rx_prev_idx; uint16_t (*rx_pkt_prev[MAX_STACKED_RX_FUCTIONS])(struct task_base *tbase, struct rte_mbuf ***mbufs); - uint32_t rx_bucket[MAX_RING_BURST + 1]; - uint32_t tx_bucket[MAX_RING_BURST + 1]; + uint32_t rx_bucket[RX_BUCKET_SIZE]; + uint32_t tx_bucket[TX_BUCKET_SIZE]; int (*tx_pkt_l2)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts, uint8_t *out); int (*tx_pkt_orig)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts, uint8_t *out); 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 @@ -204,7 +209,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)