patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] net/netvsc: fix seg fault during transmit
@ 2020-07-29 13:58 Chas Williams
  2020-07-30 15:13 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Chas Williams @ 2020-07-29 13:58 UTC (permalink / raw)
  To: dev; +Cc: sthemmin, kys, haiyangz, longli, Chas Williams, stable

Commit cc0251813277 ("net/netvsc: split send buffers from Tx
descriptors") changed the way that transmit descriptors are
allocated. They come from a single pool instead of being
individually attached to each mbuf. To find the IOVA, you need
to calculate the offset from the base of the pool.

Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <3chas3@gmail.com>
---
 drivers/net/netvsc/hn_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 86a4c0d74..0428c586a 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1421,11 +1421,12 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
 	hn_rndis_dump(txd->rndis_pkt);
 
 	/* pass IOVA of rndis header in first segment */
-	addr = rte_malloc_virt2iova(txd->rndis_pkt);
+	addr = rte_malloc_virt2iova(txq->tx_rndis);
 	if (unlikely(addr == RTE_BAD_IOVA)) {
 		PMD_DRV_LOG(ERR, "RNDIS transmit can not get iova");
 		return -EINVAL;
 	}
+	addr = addr + ((char *)txd->rndis_pkt - (char *)txq->tx_rndis);
 
 	sg[0].page = addr / PAGE_SIZE;
 	sg[0].ofs = addr & PAGE_MASK;
-- 
2.21.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/netvsc: fix seg fault during transmit
  2020-07-29 13:58 [dpdk-stable] [PATCH] net/netvsc: fix seg fault during transmit Chas Williams
@ 2020-07-30 15:13 ` " Stephen Hemminger
  2020-07-30 17:31   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2020-07-30 15:13 UTC (permalink / raw)
  To: Chas Williams; +Cc: dev, sthemmin, kys, haiyangz, longli, stable

On Wed, 29 Jul 2020 09:58:44 -0400
Chas Williams <3chas3@gmail.com> wrote:

> Commit cc0251813277 ("net/netvsc: split send buffers from Tx
> descriptors") changed the way that transmit descriptors are
> allocated. They come from a single pool instead of being
> individually attached to each mbuf. To find the IOVA, you need
> to calculate the offset from the base of the pool.
> 
> Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chas Williams <3chas3@gmail.com>

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/netvsc: fix seg fault during transmit
  2020-07-30 15:13 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
@ 2020-07-30 17:31   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-07-30 17:31 UTC (permalink / raw)
  To: Stephen Hemminger, Chas Williams
  Cc: dev, sthemmin, kys, haiyangz, longli, stable

On 7/30/2020 4:13 PM, Stephen Hemminger wrote:
> On Wed, 29 Jul 2020 09:58:44 -0400
> Chas Williams <3chas3@gmail.com> wrote:
> 
>> Commit cc0251813277 ("net/netvsc: split send buffers from Tx
>> descriptors") changed the way that transmit descriptors are
>> allocated. They come from a single pool instead of being
>> individually attached to each mbuf. To find the IOVA, you need
>> to calculate the offset from the base of the pool.
>>
>> Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Chas Williams <3chas3@gmail.com>
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> 

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 13:58 [dpdk-stable] [PATCH] net/netvsc: fix seg fault during transmit Chas Williams
2020-07-30 15:13 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2020-07-30 17:31   ` Ferruh Yigit

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox