Skip to content
Extraits de code Groupes Projets
Valider e4a50f19 rédigé par Tom Barbette's avatar Tom Barbette
Parcourir les fichiers

Fix compilation without DPDK

parent 6a64b153
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -37,7 +37,7 @@ RecordTimestamp::RecordTimestamp() : ...@@ -37,7 +37,7 @@ RecordTimestamp::RecordTimestamp() :
RecordTimestamp::~RecordTimestamp() { RecordTimestamp::~RecordTimestamp() {
} }
#if HAVE_DPDK
inline uint16_t inline uint16_t
RecordTimestamp::calc_latency(uint16_t port __rte_unused, uint16_t qidx, RecordTimestamp::calc_latency(uint16_t port __rte_unused, uint16_t qidx,
struct rte_mbuf **pkts, uint16_t nb_pkts, void *ptr) struct rte_mbuf **pkts, uint16_t nb_pkts, void *ptr)
...@@ -58,8 +58,8 @@ RecordTimestamp::calc_latency(uint16_t port __rte_unused, uint16_t qidx, ...@@ -58,8 +58,8 @@ RecordTimestamp::calc_latency(uint16_t port __rte_unused, uint16_t qidx,
rt->_timestamps[n] = TimestampT::now_steady(); rt->_timestamps[n] = TimestampT::now_steady();
} }
return nb_pkts; return nb_pkts;
} }
#endif
int RecordTimestamp::configure(Vector<String> &conf, ErrorHandler *errh) { int RecordTimestamp::configure(Vector<String> &conf, ErrorHandler *errh) {
uint32_t n = 0; uint32_t n = 0;
...@@ -71,8 +71,10 @@ int RecordTimestamp::configure(Vector<String> &conf, ErrorHandler *errh) { ...@@ -71,8 +71,10 @@ int RecordTimestamp::configure(Vector<String> &conf, ErrorHandler *errh) {
if (Args(conf, this, errh) if (Args(conf, this, errh)
.read("COUNTER", e) .read("COUNTER", e)
.read("N", n) .read("N", n)
#if HAVE_DPDK
.read("TXDEV", ElementCastArg("ToDPDKDevice"), _tx_dev) .read("TXDEV", ElementCastArg("ToDPDKDevice"), _tx_dev)
.read("TXDEV_QID", _tx_dev_id) .read("TXDEV_QID", _tx_dev_id)
#endif
.read_or_set("OFFSET", _offset, -1) .read_or_set("OFFSET", _offset, -1)
.read_or_set("DYNAMIC", _dynamic, false) .read_or_set("DYNAMIC", _dynamic, false)
.read_or_set("NET_ORDER", _net_order, false) .read_or_set("NET_ORDER", _net_order, false)
......
...@@ -107,7 +107,9 @@ private: ...@@ -107,7 +107,9 @@ private:
bool _dynamic; bool _dynamic;
bool _net_order; bool _net_order;
uint32_t _sample; uint32_t _sample;
#if HAVE_DPDK
ToDPDKDevice* _tx_dev; ToDPDKDevice* _tx_dev;
#endif
Vector<TimestampT> _timestamps; Vector<TimestampT> _timestamps;
NumberPacket *_np; NumberPacket *_np;
}; };
......
/** /**
* RSS base * RSS base
*/ */
#if RTE_VERSION >= RTE_VERSION_NUM(21,8,0,0) #if HAVE_DPDK
# if RTE_VERSION >= RTE_VERSION_NUM(21,8,0,0)
#define ETH_RSS_IPV4 RTE_ETH_RSS_IPV4 #define ETH_RSS_IPV4 RTE_ETH_RSS_IPV4
#define ETH_RSS_NONFRAG_IPV4_TCP RTE_ETH_RSS_NONFRAG_IPV4_TCP #define ETH_RSS_NONFRAG_IPV4_TCP RTE_ETH_RSS_NONFRAG_IPV4_TCP
#define ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_UDP #define ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_UDP
# endif
#endif #endif
MethodRSS::MethodRSS(NICScheduler* b, EthernetDevice* fd) : MethodRSS::MethodRSS(NICScheduler* b, EthernetDevice* fd) :
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter