git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers/net: fix number of segment storage type
[dpdk.git]
/
drivers
/
net
/
i40e
/
i40e_rxtx.c
diff --git
a/drivers/net/i40e/i40e_rxtx.c
b/drivers/net/i40e/i40e_rxtx.c
index
8b4f612
..
ad06b71
100644
(file)
--- a/
drivers/net/i40e/i40e_rxtx.c
+++ b/
drivers/net/i40e/i40e_rxtx.c
@@
-1473,13
+1473,10
@@
i40e_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
m = tx_pkts[i];
ol_flags = m->ol_flags;
m = tx_pkts[i];
ol_flags = m->ol_flags;
- /**
- * m->nb_segs is uint8_t, so nb_segs is always less than
- * I40E_TX_MAX_SEG.
- * We check only a condition for nb_segs > I40E_TX_MAX_MTU_SEG.
- */
+ /* Check for m->nb_segs to not exceed the limits. */
if (!(ol_flags & PKT_TX_TCP_SEG)) {
if (!(ol_flags & PKT_TX_TCP_SEG)) {
- if (m->nb_segs > I40E_TX_MAX_MTU_SEG) {
+ if (m->nb_segs > I40E_TX_MAX_SEG ||
+ m->nb_segs > I40E_TX_MAX_MTU_SEG) {
rte_errno = -EINVAL;
return i;
}
rte_errno = -EINVAL;
return i;
}