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

From: Sabrina Dubroca <[email-masked]>
Date: Fri, 31 Oct 2025 00:51:46 +0100

2025-10-30, 09:06:15 -0700, Stephen Hemminger wrote:
> 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.

Right. It's been on my todo list for years but I've never gotten to
it. :(

With the netlink specs project, it's also maybe less attractive?
(netlink spec for ipsec is also on my todo list and I've given
it a look, ipxfrm conversion is probably easier)

-- 
Sabrina