Skip to content

Commit

Permalink
Fix compilation without DPDK
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed Aug 10, 2023
1 parent 007fd02 commit 5ec2a15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions elements/analysis/recordtimestamp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RecordTimestamp::RecordTimestamp() :
RecordTimestamp::~RecordTimestamp() {
}


#if HAVE_DPDK
inline uint16_t
RecordTimestamp::calc_latency(uint16_t port __rte_unused, uint16_t qidx,
struct rte_mbuf **pkts, uint16_t nb_pkts, void *ptr)
Expand All @@ -58,8 +58,8 @@ RecordTimestamp::calc_latency(uint16_t port __rte_unused, uint16_t qidx,
rt->_timestamps[n] = TimestampT::now_steady();
}
return nb_pkts;

}
#endif

int RecordTimestamp::configure(Vector<String> &conf, ErrorHandler *errh) {
uint32_t n = 0;
Expand All @@ -71,8 +71,10 @@ int RecordTimestamp::configure(Vector<String> &conf, ErrorHandler *errh) {
if (Args(conf, this, errh)
.read("COUNTER", e)
.read("N", n)
#if HAVE_DPDK
.read("TXDEV", ElementCastArg("ToDPDKDevice"), _tx_dev)
.read("TXDEV_QID", _tx_dev_id)
#endif
.read_or_set("OFFSET", _offset, -1)
.read_or_set("DYNAMIC", _dynamic, false)
.read_or_set("NET_ORDER", _net_order, false)
Expand Down
2 changes: 2 additions & 0 deletions elements/analysis/recordtimestamp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ private:
bool _dynamic;
bool _net_order;
uint32_t _sample;
#if HAVE_DPDK
ToDPDKDevice* _tx_dev;
#endif
Vector<TimestampT> _timestamps;
NumberPacket *_np;
};
Expand Down
4 changes: 3 additions & 1 deletion vendor/nicscheduler/methods/rss.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/**
* 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_NONFRAG_IPV4_TCP RTE_ETH_RSS_NONFRAG_IPV4_TCP
#define ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_UDP
# endif
#endif

MethodRSS::MethodRSS(NICScheduler* b, EthernetDevice* fd) :
Expand Down

0 comments on commit 5ec2a15

Please sign in to comment.