From: Qi Zhang Date: Wed, 2 Aug 2017 07:22:09 +0000 (+0800) Subject: net/i40e: fix Rx data segment buffer length X-Git-Tag: spdx-start~2246 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ff8e79591a6cc99c475a50e87adb30d9b20569a;p=dpdk.git net/i40e: fix Rx data segment buffer length 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") Cc: stable@dpdk.org Signed-off-by: Jianfeng Tan Signed-off-by: Qi Zhang Reviewed-by: Mark Kavanagh Tested-by: Mark Kavanagh --- diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index ae64de6b60..d42c23c050 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;