* [dpdk-stable] [PATCH] net/i40e: fix data segment buffer length
@ 2017-08-02 7:22 Qi Zhang
2017-08-02 10:54 ` [dpdk-stable] [dpdk-dev] " Kavanagh, Mark B
0 siblings, 1 reply; 3+ messages in thread
From: Qi Zhang @ 2017-08-02 7:22 UTC (permalink / raw)
To: jingjing.wu; +Cc: dev, jianfeng.tang, Qi Zhang, stable, Jianfeng Tan
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 <jianfeng.tan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/i40e: fix data segment buffer length
2017-08-02 7:22 [dpdk-stable] [PATCH] net/i40e: fix data segment buffer length Qi Zhang
@ 2017-08-02 10:54 ` Kavanagh, Mark B
2017-08-03 20:47 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Kavanagh, Mark B @ 2017-08-02 10:54 UTC (permalink / raw)
To: Zhang, Qi Z, Wu, Jingjing; +Cc: dev, Zhang, Qi Z, stable, Tan, Jianfeng
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang
>Sent: Wednesday, August 2, 2017 8:22 AM
>To: Wu, Jingjing <jingjing.wu@intel.com>
>Cc: dev@dpdk.org; jianfeng.tang@intel.com; Zhang, Qi Z <qi.z.zhang@intel.com>;
>stable@dpdk.org; Tan, Jianfeng <jianfeng.tan@intel.com>
>Subject: [dpdk-dev] [PATCH] net/i40e: fix 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 <jianfeng.tan@intel.com>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Thanks guys, this resolved an issue that I'd encountered (as discussed off-list).
Reviewed-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
>---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/i40e: fix data segment buffer length
2017-08-02 10:54 ` [dpdk-stable] [dpdk-dev] " Kavanagh, Mark B
@ 2017-08-03 20:47 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-08-03 20:47 UTC (permalink / raw)
To: Zhang, Qi Z; +Cc: dev, Kavanagh, Mark B, Wu, Jingjing, stable, Tan, Jianfeng
> >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 <jianfeng.tan@intel.com>
> >Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>
> Thanks guys, this resolved an issue that I'd encountered (as discussed off-list).
>
> Reviewed-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
> Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-03 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 7:22 [dpdk-stable] [PATCH] net/i40e: fix data segment buffer length Qi Zhang
2017-08-02 10:54 ` [dpdk-stable] [dpdk-dev] " Kavanagh, Mark B
2017-08-03 20:47 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).