From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5195EA0DC; Wed, 2 Aug 2017 01:32:54 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2017 16:32:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,308,1498546800"; d="scan'208";a="132248264" Received: from dpdk_zq28.sh.intel.com ([10.67.110.203]) by orsmga005.jf.intel.com with ESMTP; 01 Aug 2017 16:32:51 -0700 From: Qi Zhang To: jingjing.wu@intel.com Cc: dev@dpdk.org, jianfeng.tang@intel.com, Qi Zhang , stable@dpdk.org, Jianfeng Tan Date: Wed, 2 Aug 2017 15:22:09 +0800 Message-Id: <20170802072209.15233-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.9.4 Subject: [dpdk-stable] [PATCH] net/i40e: fix data segment buffer length X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 23:32:56 -0000 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 --- drivers/net/i40e/i40e_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index ae64de6..d42c23c 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; -- 2.9.4