[dpdk-dev] [EXT] [PATCH 5/7] examples/ipsec-secgw: add support for telemetry

Akhil Goyal gakhil at marvell.com
Wed Sep 8 16:09:20 CEST 2021


> Add telemetry support to the IPsec GW sample app
> 
Add description about how user can use this feature.

> Signed-off-by: Declan Doherty <declan.doherty at intel.com>
> Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>


> @@ -779,20 +790,27 @@ outbound_sp(struct sp_ctx *sp, struct traffic_type
> *ip,
>  	if (ip->num == 0 || sp == NULL)
>  		return;
> 
> -	rte_acl_classify((struct rte_acl_ctx *)sp, ip->data, ip->res,
> -			ip->num, DEFAULT_MAX_CATEGORIES);
> +	rte_acl_classify((struct rte_acl_ctx *)sp,
> +			ip->data, ip->res, ip->num,
> +			DEFAULT_MAX_CATEGORIES);
Unnecessary change.

> @@ -804,15 +822,20 @@ process_pkts_outbound(struct ipsec_ctx
> *ipsec_ctx,
>  {
>  	struct rte_mbuf *m;
>  	uint16_t idx, nb_pkts_out, i;
> +	unsigned int lcoreid = rte_lcore_id();
> 
>  	/* Drop any IPsec traffic from protected ports */
>  	free_pkts(traffic->ipsec.pkts, traffic->ipsec.num);
> 
>  	traffic->ipsec.num = 0;
> 
> -	outbound_sp(ipsec_ctx->sp4_ctx, &traffic->ip4, &traffic->ipsec);
> +	outbound_spd_lookup(ipsec_ctx->sp4_ctx,
> +		&traffic->ip4, &traffic->ipsec,
> +		&core_statistics[lcoreid].outbound.spd4);
> 
> -	outbound_sp(ipsec_ctx->sp6_ctx, &traffic->ip6, &traffic->ipsec);
> +	outbound_spd_lookup(ipsec_ctx->sp6_ctx,
> +		&traffic->ip6, &traffic->ipsec,
> +		&core_statistics[lcoreid].outbound.spd4);

It should be core_statistics[lcoreid].outbound.spd6



> +	rte_tel_data_add_dict_u64(data, "packets dopped",
> +				total_pkts_dropped);
> +
> +
Extra line

> +	return 0;
> +}
> +

> +		if (strcmp(tokens[ti], "telemetry") == 0) {
> +			rule->flags |= SA_TELEMETRY_ENABLE;
> +			continue;
> +		}

Documentation update missing for this new option

Please do not add new features without documentation.




More information about the dev mailing list