[dpdk-dev,v2] net/i40e: fix checking offloading fail for Tx

Message ID 20180427014145.40693-1-yanglong.wu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Helin Zhang
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yanglong Wu April 27, 2018, 1:41 a.m. UTC
  Missing "return -ENOTSUP" will alays leads to
illegal offload passing through offload checking.

Fixes: b43290f1ade2 ("net/i40e: convert to new Tx offloads API")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
v2:
rework fix line 
---
 drivers/net/i40e/i40e_rxtx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index bc660596b..2ce930827 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2038,7 +2038,9 @@  i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
 			" or supported offloads 0x%" PRIx64,
 			(void *)dev, tx_conf->offloads,
 			dev->data->dev_conf.txmode.offloads,
-			dev_info.tx_offload_capa); }
+			dev_info.tx_offload_capa);
+			return -ENOTSUP;
+	}
 
 	if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF) {
 		vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);