diff options
author | Deepak S <deepak.s@linux.intel.com> | 2017-05-13 10:16:51 +0200 |
---|---|---|
committer | Deepak S <deepak.s@linux.intel.com> | 2017-05-30 14:50:48 +0000 |
commit | 71918b6858fbaf5745fe088403e4c9851af66046 (patch) | |
tree | fc76a87713e93ee38032b834f41bc8d7ca1756aa | |
parent | 1b0802cbf10ac4d8911f0916d4ba0b02010924c8 (diff) |
If port configuration fails. Try again after disabling TX OFFLOAD
Change-Id: I5eaf64a0cac8747ba5ac79bfd036a77cee766e39
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
-rw-r--r-- | VNFs/vACL/init.c | 14 | ||||
-rw-r--r-- | VNFs/vCGNAPT/init.c | 10 | ||||
-rw-r--r-- | VNFs/vFW/init.c | 10 |
3 files changed, 25 insertions, 9 deletions
diff --git a/VNFs/vACL/init.c b/VNFs/vACL/init.c index e85dc297..6eb39bf3 100644 --- a/VNFs/vACL/init.c +++ b/VNFs/vACL/init.c @@ -733,11 +733,15 @@ app_init_link(struct app_params *app) port_config[i].tx_conf.txq_flags &= ~(ETH_TXQ_FLAGS_NOXSUMTCP|ETH_TXQ_FLAGS_NOXSUMUDP); } - - if (ifm_port_setup (p_link->pmd_id, &port_config[i])) { - rte_panic ("Port Setup Failed: %s - %"PRIu32"\n", - p_link->name, p_link->pmd_id); - } + if (ifm_port_setup(p_link->pmd_id, &port_config[i])) { + printf("Failed to configure port %s - %"PRIu32 + ".\n", p_link->name, p_link->pmd_id); + printf("Try again with offload disabled....\n"); + port_config[i].tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS; + if (ifm_port_setup (p_link->pmd_id, &port_config[i])) + rte_panic("Port Setup Failed: %s - %" PRIu32 + "\n", p_link->name, p_link->pmd_id); + } /* LINK UP */ app_link_up_internal(app, p_link); diff --git a/VNFs/vCGNAPT/init.c b/VNFs/vCGNAPT/init.c index eff9e30e..f4d4588b 100644 --- a/VNFs/vCGNAPT/init.c +++ b/VNFs/vCGNAPT/init.c @@ -1025,8 +1025,14 @@ app_init_link(struct app_params *app) ~(ETH_TXQ_FLAGS_NOXSUMTCP|ETH_TXQ_FLAGS_NOXSUMUDP); } - if (ifm_port_setup (p_link->pmd_id, &port_config[i])) - rte_panic ("Port Setup Failed: %s - %"PRIu32"\n", p_link->name, p_link->pmd_id); + if (ifm_port_setup (p_link->pmd_id, &port_config[i])) { + printf("Failed to configure port %s - %"PRIu32 + ".\n", p_link->name, p_link->pmd_id); + printf("Try again with offload disabled....\n"); + port_config[i].tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS; + if (ifm_port_setup (p_link->pmd_id, &port_config[i])) + rte_panic ("Port Setup Failed: %s - %"PRIu32"\n", p_link->name, p_link->pmd_id); + } #if 0 /* LINK */ diff --git a/VNFs/vFW/init.c b/VNFs/vFW/init.c index 676cdb3d..54143773 100644 --- a/VNFs/vFW/init.c +++ b/VNFs/vFW/init.c @@ -769,9 +769,15 @@ app_init_link(struct app_params *app) ETH_TXQ_FLAGS_NOXSUMUDP); } - if (ifm_port_setup(p_link->pmd_id, &port_config[i])) - rte_panic("Port Setup Failed: %s - %" PRIu32 + if (ifm_port_setup(p_link->pmd_id, &port_config[i])) { + printf("Failed to configure port %s - %"PRIu32 + ".\n", p_link->name, p_link->pmd_id); + printf("Try again with offload disabled....\n"); + port_config[i].tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS; + if (ifm_port_setup (p_link->pmd_id, &port_config[i])) + rte_panic("Port Setup Failed: %s - %" PRIu32 "\n", p_link->name, p_link->pmd_id); + } app_link_up_internal(app, p_link); } |