}
/**
- * Helper function to send a serie of TC actions to the kernel
+ * Helper function to send a series of TC actions to the kernel
*
* @param[in] flow
* Pointer to rte flow containing the netlink message
static void
tap_flow_set_handle(struct rte_flow *flow)
{
+ union {
+ struct rte_flow *flow;
+ const void *key;
+ } tmp;
uint32_t handle = 0;
+ tmp.flow = flow;
+
if (sizeof(flow) > 4)
- handle = rte_jhash(&flow, sizeof(flow), 1);
+ handle = rte_jhash(tmp.key, sizeof(flow), 1);
else
handle = (uintptr_t)flow;
/* must be at least 1 to avoid letting the kernel choose one for us */
break;
/*
- * Subtract offest to restore real key index
+ * Subtract offset to restore real key index
* If a non RSS flow is falsely trying to release map
* entry 0 - the offset subtraction will calculate the real
* map index as an out-of-range value and the release operation