Hi Ian,
I did all my testing with DPDK 17.11.2 and the following OVS commit (HEAD of
master at the time of testing):
cferrite@silpixa00393943:~/ovs$ git show --summary
commit 55b259471719ceca1f0083bdd6a5f8c3e7690bae
Author: Numan Siddique <[email protected]>
Date: Thu May 24 17:45:53 2018 +0200
Extend tests for conjunctive match support in OVN
Before the patch was applied, vswitchd crashed with the following being seen in
the vswitchd log when adding a PCAP vdev:
2018-05-25T14:35:00Z|00091|netdev_dpdk|WARN|Rx checksum offload is not
supported on port 2
2018-05-25T14:35:00Z|00092|netdev_dpdk|ERR|Interface pcap-dev0 MTU (1500) setup
error: Operation not supported
2018-05-25T14:35:00Z|00093|netdev_dpdk|ERR|Interface pcap-dev0(rxq:1 txq:1 lsc
interrupt mode:false) configure error: Operation not supported
2018-05-25T14:35:00Z|00094|dpif_netdev|INFO|Core 3 on numa node 0 assigned port
'pcap-dev0' rx queue 0 (measured processing cycles 0).
After applying the patch (applied cleanly to master), the following was seen in
the vswitchd log when adding a PCAP vdev:
2018-05-25T13:38:16Z|00091|netdev_dpdk|WARN|Rx checksum offload is not
supported on port 2
2018-05-25T13:38:16Z|00092|netdev_dpdk|WARN|Interface pcap-dev0 does not
support MTU configuration, max packet size supported is 1500.
Before the patch was applied, vswitchd crashed with the following being seen in
the vswitchd log when adding a null PMD vdev:
2018-05-25T14:55:00Z|00092|netdev_dpdk|WARN|Rx checksum offload is not
supported on port 2
2018-05-25T14:55:00Z|00093|netdev_dpdk|ERR|Interface null0 MTU (1500) setup
error: Operation not supported
2018-05-25T14:55:00Z|00094|netdev_dpdk|ERR|Interface null0(rxq:1 txq:2 lsc
interrupt mode:false) configure error: Operation not supported
2018-05-25T14:55:00Z|00095|dpif_netdev|INFO|Core 3 on numa node 0 assigned port
'null0' rx queue 0 (measured processing cycles 0).
2018-05-25T14:55:00Z|00096|bridge|INFO|bridge br0: added interface null0 on
port 1
After applying the patch (applied cleanly to master), the following was seen in
the vswitchd log when adding a null PMD vdev:
2018-05-25T15:02:59Z|00091|netdev_dpdk|WARN|Rx checksum offload is not
supported on port 2
2018-05-25T15:02:59Z|00092|netdev_dpdk|WARN|Interface null0 does not support
MTU configuration, max packet size supported is 1500.
2018-05-25T15:02:59Z|00093|netdev_dpdk|INFO|Port 2: 00:00:00:00:00:00
2018-05-25T15:02:59Z|00094|dpif_netdev|INFO|Core 3 on numa node 0 assigned port
'null0' rx queue 0 (measured processing cycles 0).
2018-05-25T15:02:59Z|00095|bridge|INFO|bridge br0: added interface null0 on
port 1
In both cases, the MTU errors are fixed, with just warnings being output as is
expected.
Acked-by: Cian Ferriter <[email protected]>
Tested-by: Cian Ferriter <[email protected]>
Thanks,
Cian
> -----Original Message-----
> From: [email protected] [mailto:ovs-dev-
> [email protected]] On Behalf Of Ian Stokes
> Sent: 22 May 2018 15:54
> To: [email protected]
> Subject: [ovs-dev] [PATCH v2 1/1] netdev-dpdk: Handle ENOTSUP for
> rte_eth_dev_set_mtu.
>
> The function rte_eth_dev_set_mtu is not supported for all DPDK drivers.
> Currently if it is not supported we return an error in
> dpdk_eth_dev_queue_setup. There are two issues with this.
>
> (i) A device can still function even if rte_eth_dev_set_mtu is not supported
> albeit with the default max rx packet length.
>
> (ii) When ENOTSUP is returned it will not be caught in port_reconfigure() at
> the dpif-netdev layer. Port_reconfigure() checks if a netdev_reconfigure()
> function is supported for a given netdev and ignores EOPNOTSUPP errors as
> it assumes errors of this value mean there is no reconfiguration function.
> In this case the reconfiguration function is supported for netdev dpdk but a
> function called as part of the reconfigure (rte_eth_dev_set_mtu) may not be
> supported.
>
> As this is a corner case, this commit warns a user when
> rte_eth_dev_set_mtu is not supported and informs them of the default max
> rx packet length that will be used instead.
>
> Signed-off-by: Ian Stokes <[email protected]>
> Co-author: Michal Weglicki <[email protected]>
> Tested-By: Ciara Loftus <[email protected]>
> ---
> v1 -> v2
> * Rebase to head of master.
> * Use %"PRIu16 instead of %d for MTU value in VLOG.
> * Fix typo in comments.
> ---
> lib/netdev-dpdk.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 87152a7..390a9ba
> 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -776,6 +776,7 @@ dpdk_eth_dev_port_config(struct netdev_dpdk
> *dev, int n_rxq, int n_txq)
> int i;
> struct rte_eth_conf conf = port_conf;
> struct rte_eth_dev_info info;
> + uint16_t conf_mtu;
>
> /* As of DPDK 17.11.1 a few PMDs require to explicitly enable
> * scatter to support jumbo RX. Checking the offload capabilities @@ -
> 812,9 +813,19 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int
> n_rxq, int n_txq)
>
> diag = rte_eth_dev_set_mtu(dev->port_id, dev->mtu);
> if (diag) {
> - VLOG_ERR("Interface %s MTU (%d) setup error: %s",
> - dev->up.name, dev->mtu, rte_strerror(-diag));
> - break;
> + /* A device may not support rte_eth_dev_set_mtu, in this case
> + * flag a warning to the user and include the devices configured
> + * MTU value that will be used instead. */
> + if (-ENOTSUP == diag) {
> + rte_eth_dev_get_mtu(dev->port_id, &conf_mtu);
> + VLOG_WARN("Interface %s does not support MTU configuration, "
> + "max packet size supported is %"PRIu16".",
> + dev->up.name, conf_mtu);
> + } else {
> + VLOG_ERR("Interface %s MTU (%d) setup error: %s",
> + dev->up.name, dev->mtu, rte_strerror(-diag));
> + break;
> + }
> }
>
> for (i = 0; i < n_txq; i++) {
> --
> 2.7.5
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev