summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQi Zhang <qi.z.zhang@intel.com>2017-08-02 15:22:09 +0800
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:55:38 +0800
commit2fed757c93826213ab351a98c0f322c700e539d2 (patch)
treedee127e2f84e305aeee79369c6b5a6057b716db9
parentec241f29549496c6e6ae8c641aba472044fb0fa2 (diff)
downloaddpdk-stable-2fed757c93826213ab351a98c0f322c700e539d2.zip
dpdk-stable-2fed757c93826213ab351a98c0f322c700e539d2.tar.gz
dpdk-stable-2fed757c93826213ab351a98c0f322c700e539d2.tar.xz
net/i40e: fix Rx data segment buffer length
[ upstream commit 1ff8e79591a6cc99c475a50e87adb30d9b20569a ] Buffer length be configured for each data segment should not exceed the requested value, or device may fill data that exceed the boundary of memory that be reserved. Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
-rw-r--r--drivers/net/i40e/i40e_rxtx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 351cb94..07b09b2 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2474,7 +2474,7 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
case I40E_FLAG_HEADER_SPLIT_DISABLED:
default:
rxq->rx_hdr_len = 0;
- rxq->rx_buf_len = RTE_ALIGN(buf_size,
+ rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size,
(1 << I40E_RXQ_CTX_DBUFF_SHIFT));
rxq->hs_mode = i40e_header_split_none;
break;