src/dpdk/drivers/net/ice/ice_generic_flow.c
static void
ice_pattern_skip_void_item(struct rte_flow_item *items,
			const struct rte_flow_item *pattern)
{
	uint32_t cpy_count = 0;
	const struct rte_flow_item *pb = pattern, *pe = pattern;

	for (;;) {
		/* Find a non-void item first */
		pb = ice_find_first_item(pb, false);
		if (pb->type == RTE_FLOW_ITEM_TYPE_END) {
			pe = pb;
			break;
		}

		/* Find a void item */
		pe = ice_find_first_item(pb + 1, true);

		cpy_count = pe - pb;
		rte_memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);

		items += cpy_count;

		if (pe->type == RTE_FLOW_ITEM_TYPE_END) {
			break;
		}

		pb = pe + 1;
	}
	/* Copy the END item. */
	rte_memcpy(items, pe, sizeof(struct rte_flow_item));
}
/* Skip all VOID items of the pattern */
Skip all VOID items of the pattern
Skip all VOID items of the pattern
static void
ice_pattern_skip_void_item(struct rte_flow_item *items,
			const struct rte_flow_item *pattern)
{
	uint32_t cpy_count = 0;
	const struct rte_flow_item *pb = pattern, *pe = pattern;
	for (;;) {
		pb = ice_find_first_item(pb, false);
		if (pb->type == RTE_FLOW_ITEM_TYPE_END) {
			pe = pb;
			break;
		}
		pe = ice_find_first_item(pb + 1, true);
		cpy_count = pe - pb;
		rte_memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
		items += cpy_count;
		if (pe->type == RTE_FLOW_ITEM_TYPE_END) {
			break;
		}
		pb = pe + 1;
	}
	rte_memcpy(items, pe, sizeof(struct rte_flow_item));
}
static void ice_pattern_skip_void_item ( struct rte_flow_item * items , const struct rte_flow_item * pattern ) { uint32_t cpy_count = 0 ; const struct rte_flow_item * pb = pattern , * pe = pattern ; for ( ; ; ) { pb = ice_find_first_item ( pb , false ) ; if ( pb -> type == RTE_FLOW_ITEM_TYPE_END ) { pe = pb ; break ; } pe = ice_find_first_item ( pb + 1 , true ) ; cpy_count = pe - pb ; rte_memcpy ( items , pb , sizeof ( struct rte_flow_item ) * cpy_count ) ; items += cpy_count ; if ( pe -> type == RTE_FLOW_ITEM_TYPE_END ) { break ; } pb = pe + 1 ; } rte_memcpy ( items , pe , sizeof ( struct rte_flow_item ) ) ; }
Skip all VOID items of the pattern
Skip all VOID items of the pattern
/* Find a non-void item first */ /* Find a void item */ /* Copy the END item. */