* [dpdk-dev] [PATCH 01/11] ethdev: fix Tx prepare documentation to use positive errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
@ 2019-06-05 8:15 ` Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 02/11] net/atlantic: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (10 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:15 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, Thomas Monjalon, stable
Tx prepare documentation was incorrectly suggesting to use
negative rte_errno.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Fixes: 439a90b5f2a7 ("ethdev: reorder inline functions")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
lib/librte_ethdev/rte_ethdev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 5dd11af..45109c4 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4405,8 +4405,8 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
* The number of packets correct and ready to be sent. The return value can be
* less than the value of the *tx_pkts* parameter when some packet doesn't
* meet devices requirements with rte_errno set appropriately:
- * - -EINVAL: offload flags are not correctly set
- * - -ENOTSUP: the offload feature is not supported by the hardware
+ * - EINVAL: offload flags are not correctly set
+ * - ENOTSUP: the offload feature is not supported by the hardware
*
*/
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 02/11] net/atlantic: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 01/11] ethdev: fix Tx prepare documentation to use positive errno Andrew Rybchenko
@ 2019-06-05 8:15 ` Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 03/11] net/e1000: " Andrew Rybchenko
` (9 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:15 UTC (permalink / raw)
To: Igor Russkikh, Pavel Belous; +Cc: dev, stable
Fixes: 2b1472d7150c ("net/atlantic: implement Tx path")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/atlantic/atl_rxtx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index fe00770..449ffd4 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -824,13 +824,13 @@ struct atl_tx_queue {
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 03/11] net/e1000: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 01/11] ethdev: fix Tx prepare documentation to use positive errno Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 02/11] net/atlantic: fix Tx prepare to set positive rte_errno Andrew Rybchenko
@ 2019-06-05 8:15 ` Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 04/11] net/enic: " Andrew Rybchenko
` (8 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:15 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dev, stable
Fixes: 2b76648872c9 ("net/e1000: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/e1000/em_rxtx.c | 6 +++---
drivers/net/e1000/igb_rxtx.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 482d884..708f832 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -616,20 +616,20 @@ struct em_tx_queue {
m = tx_pkts[i];
if (m->ol_flags & E1000_TX_OFFLOAD_NOTSUP_MASK) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 871b5f3..c5606de 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -632,25 +632,25 @@ struct igb_tx_queue {
if ((m->tso_segsz > IGB_TSO_MAX_MSS) ||
(m->l2_len + m->l3_len + m->l4_len >
IGB_TSO_MAX_HDRLEN)) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
if (m->ol_flags & IGB_TX_OFFLOAD_NOTSUP_MASK) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 04/11] net/enic: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (2 preceding siblings ...)
2019-06-05 8:15 ` [dpdk-dev] [PATCH 03/11] net/e1000: " Andrew Rybchenko
@ 2019-06-05 8:15 ` Andrew Rybchenko
2019-06-05 8:15 ` [dpdk-dev] [PATCH 05/11] net/fm10k: " Andrew Rybchenko
` (7 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:15 UTC (permalink / raw)
To: John Daley, Hyong Youb Kim; +Cc: dev, stable
Fixes: 1e81dbb5321b ("net/enic: add Tx prepare handler")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/enic/enic_rxtx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index 0aadd34..8fa8647 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -416,13 +416,13 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 05/11] net/fm10k: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (3 preceding siblings ...)
2019-06-05 8:15 ` [dpdk-dev] [PATCH 04/11] net/enic: " Andrew Rybchenko
@ 2019-06-05 8:15 ` Andrew Rybchenko
2019-06-10 2:05 ` Wang, Xiao W
2019-06-05 8:15 ` [dpdk-dev] [PATCH 06/11] net/i40e: " Andrew Rybchenko
` (6 subsequent siblings)
11 siblings, 1 reply; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:15 UTC (permalink / raw)
To: Qi Zhang, Xiao Wang; +Cc: dev, stable
Fixes: 9b134aa39716 ("net/fm10k: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/fm10k/fm10k_rxtx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index cc95f95..2f4dad0 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -698,25 +698,25 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
if ((m->ol_flags & PKT_TX_TCP_SEG) &&
(m->tso_segsz < FM10K_TSO_MINMSS)) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
if (m->ol_flags & FM10K_TX_OFFLOAD_NOTSUP_MASK) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH 05/11] net/fm10k: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 ` [dpdk-dev] [PATCH 05/11] net/fm10k: " Andrew Rybchenko
@ 2019-06-10 2:05 ` Wang, Xiao W
0 siblings, 0 replies; 15+ messages in thread
From: Wang, Xiao W @ 2019-06-10 2:05 UTC (permalink / raw)
To: Andrew Rybchenko, Zhang, Qi Z; +Cc: dev, stable
Hi,
> -----Original Message-----
> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> Sent: Wednesday, June 5, 2019 4:16 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Xiao W
> <xiao.w.wang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 05/11] net/fm10k: fix Tx prepare to set positive rte_errno
>
> Fixes: 9b134aa39716 ("net/fm10k: add Tx preparation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> drivers/net/fm10k/fm10k_rxtx.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
> index cc95f95..2f4dad0 100644
> --- a/drivers/net/fm10k/fm10k_rxtx.c
> +++ b/drivers/net/fm10k/fm10k_rxtx.c
> @@ -698,25 +698,25 @@ static inline void tx_xmit_pkt(struct
> fm10k_tx_queue *q, struct rte_mbuf *mb)
>
> if ((m->ol_flags & PKT_TX_TCP_SEG) &&
> (m->tso_segsz < FM10K_TSO_MINMSS)) {
> - rte_errno = -EINVAL;
> + rte_errno = EINVAL;
> return i;
> }
>
> if (m->ol_flags & FM10K_TX_OFFLOAD_NOTSUP_MASK) {
> - rte_errno = -ENOTSUP;
> + rte_errno = ENOTSUP;
> return i;
> }
>
> #ifdef RTE_LIBRTE_ETHDEV_DEBUG
> ret = rte_validate_tx_offload(m);
> if (ret != 0) {
> - rte_errno = ret;
> + rte_errno = -ret;
> return i;
> }
> #endif
> ret = rte_net_intel_cksum_prepare(m);
> if (ret != 0) {
> - rte_errno = ret;
> + rte_errno = -ret;
> return i;
> }
> }
> --
> 1.8.3.1
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 06/11] net/i40e: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (4 preceding siblings ...)
2019-06-05 8:15 ` [dpdk-dev] [PATCH 05/11] net/fm10k: " Andrew Rybchenko
@ 2019-06-05 8:15 ` Andrew Rybchenko
2019-06-05 8:16 ` [dpdk-dev] [PATCH 07/11] net/iavf: " Andrew Rybchenko
` (5 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:15 UTC (permalink / raw)
To: Beilei Xing, Qi Zhang; +Cc: dev, stable
Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
Fixes: bfeed0262b0c ("net/i40e: check illegal packets")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/i40e/i40e_rxtx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 7618153..3787fa7 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1446,7 +1446,7 @@
if (!(ol_flags & PKT_TX_TCP_SEG)) {
if (m->nb_segs > I40E_TX_MAX_MTU_SEG ||
m->pkt_len > I40E_FRAME_SIZE_MAX) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
} else if (m->nb_segs > I40E_TX_MAX_SEG ||
@@ -1456,31 +1456,31 @@
/* MSS outside the range (256B - 9674B) are considered
* malicious
*/
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
if (ol_flags & I40E_TX_OFFLOAD_NOTSUP_MASK) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
/* check the size of packet */
if (m->pkt_len < I40E_TX_MIN_PKT_LEN) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 07/11] net/iavf: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (5 preceding siblings ...)
2019-06-05 8:15 ` [dpdk-dev] [PATCH 06/11] net/i40e: " Andrew Rybchenko
@ 2019-06-05 8:16 ` Andrew Rybchenko
2019-06-05 8:16 ` [dpdk-dev] [PATCH 08/11] net/ice: " Andrew Rybchenko
` (4 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:16 UTC (permalink / raw)
To: Jingjing Wu, Wenzhuo Lu; +Cc: dev, stable
Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/iavf/iavf_rxtx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 682e8aa..0be3ede 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1698,31 +1698,31 @@
/* Check condition for nb_segs > IAVF_TX_MAX_MTU_SEG. */
if (!(ol_flags & PKT_TX_TCP_SEG)) {
if (m->nb_segs > IAVF_TX_MAX_MTU_SEG) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
} else if ((m->tso_segsz < IAVF_MIN_TSO_MSS) ||
(m->tso_segsz > IAVF_MAX_TSO_MSS)) {
/* MSS outside the range are considered malicious */
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
if (ol_flags & IAVF_TX_OFFLOAD_NOTSUP_MASK) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 08/11] net/ice: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (6 preceding siblings ...)
2019-06-05 8:16 ` [dpdk-dev] [PATCH 07/11] net/iavf: " Andrew Rybchenko
@ 2019-06-05 8:16 ` Andrew Rybchenko
2019-06-05 8:16 ` [dpdk-dev] [PATCH 09/11] net/ixgbe: " Andrew Rybchenko
` (3 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:16 UTC (permalink / raw)
To: Qiming Yang, Wenzhuo Lu; +Cc: dev, stable
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/ice/ice_rxtx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c0d1a4b..84aeec2 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2370,20 +2370,20 @@ void __attribute__((cold))
/**
* MSS outside the range are considered malicious
*/
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 09/11] net/ixgbe: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (7 preceding siblings ...)
2019-06-05 8:16 ` [dpdk-dev] [PATCH 08/11] net/ice: " Andrew Rybchenko
@ 2019-06-05 8:16 ` Andrew Rybchenko
2019-06-05 8:16 ` [dpdk-dev] [PATCH 10/11] net/qede: " Andrew Rybchenko
` (2 subsequent siblings)
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:16 UTC (permalink / raw)
To: Wenzhuo Lu, Konstantin Ananyev; +Cc: dev, stable
Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 4be7f72..bd17a1d 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -984,25 +984,25 @@ uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
*/
if (m->nb_segs > IXGBE_TX_MAX_SEG - txq->wthresh) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
if (ol_flags & IXGBE_TX_OFFLOAD_NOTSUP_MASK) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 10/11] net/qede: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (8 preceding siblings ...)
2019-06-05 8:16 ` [dpdk-dev] [PATCH 09/11] net/ixgbe: " Andrew Rybchenko
@ 2019-06-05 8:16 ` Andrew Rybchenko
2019-06-05 8:16 ` [dpdk-dev] [PATCH 11/11] net/vmxnet3: " Andrew Rybchenko
2019-06-11 14:44 ` [dpdk-dev] [PATCH 00/11] ethdev: " Ferruh Yigit
11 siblings, 0 replies; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:16 UTC (permalink / raw)
To: Rasesh Mody, Shahed Shaikh; +Cc: dev, stable
Fixes: 29540be7efce ("net/qede: support LRO/TSO offloads")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/qede/qede_rxtx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index bae26ce..c38cbb9 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1798,17 +1798,17 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags)
ol_flags = m->ol_flags;
if (ol_flags & PKT_TX_TCP_SEG) {
if (m->nb_segs >= ETH_TX_MAX_BDS_PER_LSO_PACKET) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
break;
}
/* TBD: confirm its ~9700B for both ? */
if (m->tso_segsz > ETH_TX_MAX_NON_LSO_PKT_LEN) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
break;
}
} else {
if (m->nb_segs >= ETH_TX_MAX_BDS_PER_NON_LSO_PACKET) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
break;
}
}
@@ -1825,14 +1825,14 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags)
continue;
}
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
break;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
break;
}
#endif
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH 11/11] net/vmxnet3: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (9 preceding siblings ...)
2019-06-05 8:16 ` [dpdk-dev] [PATCH 10/11] net/qede: " Andrew Rybchenko
@ 2019-06-05 8:16 ` Andrew Rybchenko
2019-06-05 22:45 ` Yong Wang
2019-06-11 14:44 ` [dpdk-dev] [PATCH 00/11] ethdev: " Ferruh Yigit
11 siblings, 1 reply; 15+ messages in thread
From: Andrew Rybchenko @ 2019-06-05 8:16 UTC (permalink / raw)
To: Yong Wang; +Cc: dev, stable
Fixes: baf3bbae5556 ("net/vmxnet3: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 6644cde..7794d74 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -361,7 +361,7 @@
*/
if ((ol_flags & PKT_TX_TCP_SEG) == 0 &&
m->nb_segs > VMXNET3_MAX_TXD_PER_PKT) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
@@ -369,20 +369,20 @@
if ((ol_flags & VMXNET3_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
(ol_flags & PKT_TX_L4_MASK) ==
PKT_TX_SCTP_CKSUM) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH 11/11] net/vmxnet3: fix Tx prepare to set positive rte_errno
2019-06-05 8:16 ` [dpdk-dev] [PATCH 11/11] net/vmxnet3: " Andrew Rybchenko
@ 2019-06-05 22:45 ` Yong Wang
0 siblings, 0 replies; 15+ messages in thread
From: Yong Wang @ 2019-06-05 22:45 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dev, stable
-----Original Message-----
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wednesday, June 5, 2019 at 1:17 AM
To: Yong Wang <yongwang@vmware.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: [PATCH 11/11] net/vmxnet3: fix Tx prepare to set positive rte_errno
Fixes: baf3bbae5556 ("net/vmxnet3: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
Acked-by: Yong Wang <yongwang@vmware.com>
drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 6644cde..7794d74 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -361,7 +361,7 @@
*/
if ((ol_flags & PKT_TX_TCP_SEG) == 0 &&
m->nb_segs > VMXNET3_MAX_TXD_PER_PKT) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return i;
}
@@ -369,20 +369,20 @@
if ((ol_flags & VMXNET3_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
(ol_flags & PKT_TX_L4_MASK) ==
PKT_TX_SCTP_CKSUM) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
ret = rte_net_intel_cksum_prepare(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno
2019-06-05 8:15 [dpdk-dev] [PATCH 00/11] ethdev: fix Tx prepare to set positive rte_errno Andrew Rybchenko
` (10 preceding siblings ...)
2019-06-05 8:16 ` [dpdk-dev] [PATCH 11/11] net/vmxnet3: " Andrew Rybchenko
@ 2019-06-11 14:44 ` Ferruh Yigit
11 siblings, 0 replies; 15+ messages in thread
From: Ferruh Yigit @ 2019-06-11 14:44 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dev, Thomas Monjalon
On 6/5/2019 9:15 AM, Andrew Rybchenko wrote:
> Tx prepare documentation incorrectly suggested to set rte_errno to
> negative errno value and many drivers follow.
>
> Andrew Rybchenko (11):
> ethdev: fix Tx prepare documentation to use positive errno
> net/atlantic: fix Tx prepare to set positive rte_errno
> net/e1000: fix Tx prepare to set positive rte_errno
> net/enic: fix Tx prepare to set positive rte_errno
> net/fm10k: fix Tx prepare to set positive rte_errno
> net/i40e: fix Tx prepare to set positive rte_errno
> net/iavf: fix Tx prepare to set positive rte_errno
> net/ice: fix Tx prepare to set positive rte_errno
> net/ixgbe: fix Tx prepare to set positive rte_errno
> net/qede: fix Tx prepare to set positive rte_errno
> net/vmxnet3: fix Tx prepare to set positive rte_errno
For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread