[dpdk-dev] [PATCH] gso: fix free issue of mbuf gso segments attach to

Hu, Jiayu jiayu.hu at intel.com
Thu Oct 15 07:14:35 CEST 2020



> -----Original Message-----
> From: Ananyev, Konstantin <konstantin.ananyev at intel.com>
> Sent: Wednesday, October 14, 2020 8:06 PM
> To: yang_y_yi <yang_y_yi at 163.com>; Hu, Jiayu <jiayu.hu at intel.com>
> Cc: dev at dpdk.org; olivier.matz at 6wind.com; thomas at monjalon.net;
> yangyi01 at inspur.com
> Subject: RE: Re:RE: [PATCH] gso: fix free issue of mbuf gso segments attach to
> 
> 
> > From: yang_y_yi <yang_y_yi at 163.com>
> > Sent: Wednesday, October 14, 2020 3:56 AM
> > To: Hu, Jiayu <jiayu.hu at intel.com>
> > Cc: Ananyev, Konstantin <konstantin.ananyev at intel.com>; dev at dpdk.org;
> olivier.matz at 6wind.com; thomas at monjalon.net;
> > yangyi01 at inspur.com
> > Subject: Re:RE: [PATCH] gso: fix free issue of mbuf gso segments attach to
> >
> > I think it isn't a good idea to free it in rte_gso_segment, maybe application
> will continue to use this pkt for other purpose, rte_gso_segment
> > can't make decision for application without any notice, it is better to return
> this decision right backt to application.
> >
> 
> I think, if user wants to keep original packet, he can always call
> rte_pktmbuf_refcnt_update(pkt, 1)
> just before calling gso function.
> 
> Also, as I remember in some cases it is not safe to do free() for input packet
> (as pkt_out[] can contain input pkt itself). Would it also be user responsibility
> to determine
> such situations?

In what case will pkt_out[] contain the input pkt? Can you give an example?

Thanks,
Jiayu

> 
> P.S. Please don't reply on the top.
> 
> Konstantin
> 
> >
> >
> >
> >



More information about the dev mailing list