src/dpdk/drivers/net/mvpp2/mrvl_flow.c
static int
mrvl_parse_ip6_flow(const struct rte_flow_item_ipv6 *spec,
		    const struct rte_flow_item_ipv6 *mask,
		    struct rte_flow *flow)
{
	struct pp2_cls_rule_key_field *key_field;
	uint32_t k = rte_be_to_cpu_32(spec->hdr.vtc_flow) & MRVL_IPV6_FLOW_MASK,
		 m = rte_be_to_cpu_32(mask->hdr.vtc_flow) & MRVL_IPV6_FLOW_MASK;

	key_field = &flow->rule.fields[flow->rule.num_fields];
	mrvl_alloc_key_mask(key_field);
	key_field->size = 3;

	snprintf((char *)key_field->key, MRVL_CLS_STR_SIZE_MAX, "%u", k);
	snprintf((char *)key_field->mask, MRVL_CLS_STR_SIZE_MAX, "%u", m);

	flow->table_key.proto_field[flow->rule.num_fields].proto =
		MV_NET_PROTO_IP6;
	flow->table_key.proto_field[flow->rule.num_fields].field.ipv6 =
		MV_NET_IP6_F_FLOW;
	flow->table_key.key_size += key_field->size;

	flow->rule.num_fields += 1;

	return 0;
}
/**
 * Parse the flow label of the ipv6 flow item.
 *
 * This will create classifier rule that matches flow field.
 *
 * @param spec Pointer to the specific flow item.
 * @param mask Pointer to the specific flow item's mask.
 * @param flow Pointer to the flow.
 * @return 0 in case of success, negative error value otherwise.
 */
Parse the flow label of the ipv6 flow item.
This will create classifier rule that matches flow field.

@param spec Pointer to the specific flow item.
@param mask Pointer to the specific flow item's mask.
@param flow Pointer to the flow.
@return 0 in case of success, negative error value otherwise.
Parse the flow label of the ipv6 flow item . This will create classifier rule that matches flow field . @param spec Pointer to the specific flow item . @param mask Pointer to the specific flow item ' s mask . @param flow Pointer to the flow . @return 0 in case of success negative error value otherwise .
static int
mrvl_parse_ip6_flow(const struct rte_flow_item_ipv6 *spec,
		    const struct rte_flow_item_ipv6 *mask,
		    struct rte_flow *flow)
{
	struct pp2_cls_rule_key_field *key_field;
	uint32_t k = rte_be_to_cpu_32(spec->hdr.vtc_flow) & MRVL_IPV6_FLOW_MASK,
		 m = rte_be_to_cpu_32(mask->hdr.vtc_flow) & MRVL_IPV6_FLOW_MASK;
	key_field = &flow->rule.fields[flow->rule.num_fields];
	mrvl_alloc_key_mask(key_field);
	key_field->size = 3;
	snprintf((char *)key_field->key, MRVL_CLS_STR_SIZE_MAX, "%u", k);
	snprintf((char *)key_field->mask, MRVL_CLS_STR_SIZE_MAX, "%u", m);
	flow->table_key.proto_field[flow->rule.num_fields].proto =
		MV_NET_PROTO_IP6;
	flow->table_key.proto_field[flow->rule.num_fields].field.ipv6 =
		MV_NET_IP6_F_FLOW;
	flow->table_key.key_size += key_field->size;
	flow->rule.num_fields += 1;
	return 0;
}
static int mrvl_parse_ip6_flow ( const struct rte_flow_item_ipv6 * spec , const struct rte_flow_item_ipv6 * mask , struct rte_flow * flow ) { struct pp2_cls_rule_key_field * key_field ; uint32_t k = rte_be_to_cpu_32 ( spec -> hdr . vtc_flow ) & MRVL_IPV6_FLOW_MASK , m = rte_be_to_cpu_32 ( mask -> hdr . vtc_flow ) & MRVL_IPV6_FLOW_MASK ; key_field = & flow -> rule . fields [ flow -> rule . num_fields ] ; mrvl_alloc_key_mask ( key_field ) ; key_field -> size = 3 ; snprintf ( ( char * ) key_field -> key , MRVL_CLS_STR_SIZE_MAX , " " , k ) ; snprintf ( ( char * ) key_field -> mask , MRVL_CLS_STR_SIZE_MAX , " " , m ) ; flow -> table_key . proto_field [ flow -> rule . num_fields ] . proto = MV_NET_PROTO_IP6 ; flow -> table_key . proto_field [ flow -> rule . num_fields ] . field . ipv6 = MV_NET_IP6_F_FLOW ; flow -> table_key . key_size += key_field -> size ; flow -> rule . num_fields += 1 ; return 0 ; }
Parse the flow label of the ipv6 flow item.
Parse the flow label of the ipv6 flow item .