4#include <rte_version.h>
5#include <rte_hash_crc.h>
6#include <click/ipflowid.hh>
8#if RTE_VERSION >= RTE_VERSION_NUM(22,07,0,0)
9#define PKT_RX_TIMESTAMP RTE_MBUF_F_RX_TIMESTAMP
13ipv4_hash_crc(
const void *data, uint32_t data_len,
20 k = (
const IPFlow5ID *)data;
22 p = ((
const uint32_t *)k) + 2;
23 init_val = rte_hash_crc_4byte(t, init_val);
24 init_val = rte_hash_crc_4byte(k->saddr(), init_val);
25 init_val = rte_hash_crc_4byte(k->daddr(), init_val);
26 init_val = rte_hash_crc_4byte(*p, init_val);
30#if RTE_VERSION <= RTE_VERSION_NUM(2,2,0,0)
31static inline int rte_ring_mc_dequeue_bulk(
struct rte_ring *r,
void **obj_table,
unsigned n,
void *) {
32 rte_ring_mc_dequeue_bulk(r, obj_table,n);
36#ifndef RTE_MBUF_INDIRECT
37#define RTE_MBUF_INDIRECT(m) RTE_MBUF_CLONED(m)
40#if RTE_VERSION < RTE_VERSION_NUM(20,11,0,0)
41#define TIMESTAMP_FIELD(mbuf) \
43#define HAS_TIMESTAMP(mbuf) \
44 (mbuf->ol_flags & PKT_RX_TIMESTAMP)
47#include <rte_mbuf_dyn.h>
49#include <rte_bitops.h>
50#define TIMESTAMP_FIELD(mbuf) \
51 (*RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset, uint64_t *))
52#define HAS_TIMESTAMP(mbuf) \
53 ((mbuf)->ol_flags & timestamp_dynflag)
55extern int timestamp_dynfield_offset;
56extern uint64_t timestamp_dynflag;