[dpdk-dev] [PATCH v3 1/3] examples/ip_reassembly: add parse-ptype option

Tan, Jianfeng jianfeng.tan at intel.com
Fri Feb 10 10:00:28 CET 2017


Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Friday, February 10, 2017 4:36 PM
> To: Liu, Yong
> Cc: Tan, Jianfeng; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 1/3] examples/ip_reassembly: add parse-
> ptype option
> 
> 2017-02-10 07:53, Liu, Yong:
> > From: Thomas Monjalon
> > > 2017-02-09 22:25, Marvin Liu:
> > > > Add new option parse-ptype in this sample in case of pmd driver
> > > > not provide packet type info. If this option enabled, packet type
> > > > will be analyzed in Rx callback function.
> > > [...]
> > > > +		if (parse_ptype) {
> > > > +			if (add_cb_parse_ptype(portid, queueid) < 0)
> > > > +				rte_exit(EXIT_FAILURE,
> > > > +					"Fail to add ptype cb\n");
> > > > +		} else if (!check_ptype(portid))
> > > > +			rte_exit(EXIT_FAILURE,
> > > > +				"PMD can not provide needed ptypes\n");
> > >
> > > Instead of adding a new option, why not adding the callback automatically
> > > if the packet type is not supported by the hardware?
> >
> > Thomas,
> > We want to let user choice which kind of method for packet type parsing.
> > If start application with parse-type option, is meaning user want to use
> software parsing otherwise will use hardware parsing.
> 
> I do not understand why this user choice matters.
> If it is available, hardware ptype is better, isn't it?
> It it is not available, we need to be aware of this specific issue,
> otherwise we have the error "PMD can not provide needed ptypes"
> (without suggesting to use the option).

Actually, Konstantin is suggesting this way, I quote here:
    1. if '--parse-ptype' present always use SW parsing;
    2. else check does HW support ptype recognition:
       - if yes, then use HW offload
       - else use SW

By this way, most case, user does not need to specify this option, except the case that, user wants to compare the performance of HW and SW ptype version when the NIC actually supports HW ptypes.

I agree with this way. How do you think?

Thanks,
Jianfeng





More information about the dev mailing list