On 7 Jul 2021, at 17:16, Amber, Kumar wrote:
> Hi Eelco,
>
> Don’t know the formatting keeps breaking . replies are inline.
>
<Snip>
> + /* argv[2] is optional packet count, which user can provide along with
> + * study function to set the minimum packet that must be matched in order
> + * to choose the optimal function. */
> + uint32_t pkt_cmp_count = 0;
> + uint32_t study_ret = 0;
> +
> + if ((argc == 3) || (argc == 4)) {
> + if (str_to_uint(argv[2], 10, &pkt_cmp_count)) {
> + study_ret = mfex_set_study_pkt_cnt(pkt_cmp_count, mfex_name);
> + } else {
> + study_ret = -EINVAL;
>
> An invalid input was given so we should error out.
>
> The error is handled later and since we already have a fallback to default
> value we just fall-back.
Don't think we should fallback to default, because if someone types:
$ ovs-appctl dpif-netdev/miniflow-parser-set autovalidator
THIS_PACKET_COUNT_PLEASE
Miniflow implementation set to autovalidator
We accept it and use the default value, it’s better to error out…
<snip>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev