src/dpdk/drivers/net/enic/enic_flow.c
static void
fixup_l5_layer(struct enic *enic, struct filter_generic_1 *gp,
	       uint8_t inner_ofst)
{
	uint8_t layer[FILTER_GENERIC_1_KEY_LEN];
	uint8_t inner;
	uint8_t vxlan;

	if (!(inner_ofst > 0 && enic->vxlan))
		return;
	ENICPMD_FUNC_TRACE();
	vxlan = sizeof(struct rte_vxlan_hdr);
	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct rte_udp_hdr),
	       gp->layer[FILTER_GENERIC_1_L5].mask, vxlan);
	memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct rte_udp_hdr),
	       gp->layer[FILTER_GENERIC_1_L5].val, vxlan);
	inner = inner_ofst - vxlan;
	memset(layer, 0, sizeof(layer));
	memcpy(layer, gp->layer[FILTER_GENERIC_1_L5].mask + vxlan, inner);
	memcpy(gp->layer[FILTER_GENERIC_1_L5].mask, layer, sizeof(layer));
	memset(layer, 0, sizeof(layer));
	memcpy(layer, gp->layer[FILTER_GENERIC_1_L5].val + vxlan, inner);
	memcpy(gp->layer[FILTER_GENERIC_1_L5].val, layer, sizeof(layer));
}
/*
 * Fix up the L5 layer.. HW vxlan parsing removes vxlan header from L5.
 * Instead it is in L4 following the UDP header. Append the vxlan
 * pattern to L4 (udp) and shift any inner packet pattern in L5.
 */
Fix up the L5 layer.. HW vxlan parsing removes vxlan header from L5.
Instead it is in L4 following the UDP header. Append the vxlan
pattern to L4 (udp) and shift any inner packet pattern in L5.
Fix up the L5 layer .. HW vxlan parsing removes vxlan header from L5 . Instead it is in L4 following the UDP header . Append the vxlan pattern to L4 ( udp ) and shift any inner packet pattern in L5 .
static void
fixup_l5_layer(struct enic *enic, struct filter_generic_1 *gp,
	       uint8_t inner_ofst)
{
	uint8_t layer[FILTER_GENERIC_1_KEY_LEN];
	uint8_t inner;
	uint8_t vxlan;
	if (!(inner_ofst > 0 && enic->vxlan))
		return;
	ENICPMD_FUNC_TRACE();
	vxlan = sizeof(struct rte_vxlan_hdr);
	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct rte_udp_hdr),
	       gp->layer[FILTER_GENERIC_1_L5].mask, vxlan);
	memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct rte_udp_hdr),
	       gp->layer[FILTER_GENERIC_1_L5].val, vxlan);
	inner = inner_ofst - vxlan;
	memset(layer, 0, sizeof(layer));
	memcpy(layer, gp->layer[FILTER_GENERIC_1_L5].mask + vxlan, inner);
	memcpy(gp->layer[FILTER_GENERIC_1_L5].mask, layer, sizeof(layer));
	memset(layer, 0, sizeof(layer));
	memcpy(layer, gp->layer[FILTER_GENERIC_1_L5].val + vxlan, inner);
	memcpy(gp->layer[FILTER_GENERIC_1_L5].val, layer, sizeof(layer));
}
static void fixup_l5_layer ( struct enic * enic , struct filter_generic_1 * gp , uint8_t inner_ofst ) { uint8_t layer [ FILTER_GENERIC_1_KEY_LEN ] ; uint8_t inner ; uint8_t vxlan ; if ( ! ( inner_ofst > 0 && enic -> vxlan ) ) return ; ENICPMD_FUNC_TRACE ( ) ; vxlan = sizeof ( struct rte_vxlan_hdr ) ; memcpy ( gp -> layer [ FILTER_GENERIC_1_L4 ] . mask + sizeof ( struct rte_udp_hdr ) , gp -> layer [ FILTER_GENERIC_1_L5 ] . mask , vxlan ) ; memcpy ( gp -> layer [ FILTER_GENERIC_1_L4 ] . val + sizeof ( struct rte_udp_hdr ) , gp -> layer [ FILTER_GENERIC_1_L5 ] . val , vxlan ) ; inner = inner_ofst - vxlan ; memset ( layer , 0 , sizeof ( layer ) ) ; memcpy ( layer , gp -> layer [ FILTER_GENERIC_1_L5 ] . mask + vxlan , inner ) ; memcpy ( gp -> layer [ FILTER_GENERIC_1_L5 ] . mask , layer , sizeof ( layer ) ) ; memset ( layer , 0 , sizeof ( layer ) ) ; memcpy ( layer , gp -> layer [ FILTER_GENERIC_1_L5 ] . val + vxlan , inner ) ; memcpy ( gp -> layer [ FILTER_GENERIC_1_L5 ] . val , layer , sizeof ( layer ) ) ; }
Fix up the L5 layer.. HW vxlan parsing removes vxlan header from L5.
Fix up the L5 layer .. HW vxlan parsing removes vxlan header from L5 .