[ovs-dev] [PATCH v1] netdev-dpdk: Fix flow control configuration.
Konieczny, TomaszX
tomaszx.konieczny at intel.com
Thu Sep 12 07:25:00 UTC 2019
>-----Original Message-----
>From: Ilya Maximets <i.maximets at samsung.com>
>Sent: 11 September 2019 15:29
>To: Konieczny, TomaszX <tomaszx.konieczny at intel.com>; dev at openvswitch.org
>Cc: Stokes, Ian <ian.stokes at intel.com>
>Subject: Re: [ovs-dev] [PATCH v1] netdev-dpdk: Fix flow control configuration.
>
>OK. We could, actually, check if user configured something for flow control in
>following way:
>
> flow_control_requested = true;
> if (!smap_get(args, "rx-flow-ctrl") && !smap_get(args, "tx-flow-ctrl")
> && !smap_get(args, "flow-ctrl-autoneg")) {
> /* FIXME: User didn't ask for flow control configuration.
> * For now we'll not print a warning if flow control is not
> * supported by the DPDK port. */
> flow_control_requested = false;
> }
>
>And warn only if something was requested:
>
> if (err == -ENOTSUP) {
> if (flow_control_requested) {
> VLOG_WARN("%s: Flow control is not supported.",
> netdev_get_name(netdev));
> }
> err = 0; /* Not fatal. */
> }
>
>Alternatively we could dynamically choose the log level in case we want some
>message printed in both cases:
>
> VLOG(flow_control_requested ? VLL_WARN : VLL_INFO,
> "%s: Flow control is not supported.", netdev_get_name(netdev));
>
>VLL_INFO could be changed to VLL_DBG if you think we shouldn't bother users
>with additional information.
>
>Best regards, Ilya Maximets.
Ok, that should work, I'll prepare v2.
Regards
Tomasz Konieczny
---------------------------------------------------------------------
Intel Corporation (UK) Ltd.
Co. Reg. #1134945
Pipers Way, Swindon SN3 1RJ
More information about the dev
mailing list