Subject: Re: [PATCH iproute2-next] ip-xfrm: add pcpu-num support

From: Stephen Hemminger <[email-masked]>
Date: Thu, 30 Oct 2025 09:06:15 -0700

On Wed, 29 Oct 2025 12:06:16 +0100
Sabrina Dubroca <[email-masked]> wrote:

> diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
> index b15cc0002e5b..586d24fb8594 100644
> --- a/ip/ipxfrm.c
> +++ b/ip/ipxfrm.c
> @@ -919,6 +919,12 @@ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family, FILE *fp,
>  			fprintf(fp, "other (%d)", dir);
>  		fprintf(fp, "%s", _SL_);
>  	}
> +	if (tb[XFRMA_SA_PCPU]) {
> +		__u32 pcpu_num = rta_getattr_u32(tb[XFRMA_SA_PCPU]);
> +
> +		fprintf(fp, "\tpcpu-num %u", pcpu_num);
> +		fprintf(fp, "%s", _SL_);
> +	}
>  }
>  
Reminds me that xfrm is overdue for conversion to JSON output.