Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-08-31 Thread Mihai Brodschi
Yigit wrote: > On 7/8/2024 12:45 PM, Ferruh Yigit wrote: >> On 7/8/2024 4:39 AM, Mihai Brodschi wrote: >>> >>> >>> On 07/07/2024 21:46, Mihai Brodschi wrote: >>>> >>>> >>>> On 07/07/2024 18:18, Mihai Brodschi wrote: >>>>

[PATCH] net/memif: fix buffer overflow in zero copy Rx

2024-06-28 Thread Mihai Brodschi
ption and duplicate mbufs being received. Allocate 2x the space for the mbuf ring, so that the alloc function has a contiguous array to write to, then copy the excess entries to the start of the array. Fixes: 43b815d88188 ("net/memif: support zero-copy slave") Cc: sta...@dpdk.org Signe

[PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-06-28 Thread Mihai Brodschi
n and duplicate mbufs being received. Allocate 2x the space for the mbuf ring, so that the alloc function has a contiguous array to write to, then copy the excess entries to the start of the array. Fixes: 43b815d88188 ("net/memif: support zero-copy slave") Cc: sta...@dpdk.org Signe

Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-07-06 Thread Mihai Brodschi
Hi Ferruh, On 07/07/2024 05:12, Ferruh Yigit wrote: > On 6/28/2024 10:01 PM, Mihai Brodschi wrote: >> rte_pktmbuf_alloc_bulk is called by the zero-copy receiver to allocate >> new mbufs to be provided to the sender. The allocated mbuf pointers >> are stored in a ring, b

Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-07-06 Thread Mihai Brodschi
Hi Ferruh, On 07/07/2024 05:12, Ferruh Yigit wrote: > On 6/28/2024 10:01 PM, Mihai Brodschi wrote: >> rte_pktmbuf_alloc_bulk is called by the zero-copy receiver to allocate >> new mbufs to be provided to the sender. The allocated mbuf pointers >> are stored in a ring, b

Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-07-07 Thread Mihai Brodschi
On 07/07/2024 17:05, Ferruh Yigit wrote: > On 7/7/2024 6:50 AM, Mihai Brodschi wrote: >> Hi Ferruh, >> >> On 07/07/2024 05:12, Ferruh Yigit wrote: >>> On 6/28/2024 10:01 PM, Mihai Brodschi wrote: >>>> rte_pktmbuf_alloc_bulk is called by the zero-copy

Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-07-07 Thread Mihai Brodschi
On 07/07/2024 18:18, Mihai Brodschi wrote: > > > On 07/07/2024 17:05, Ferruh Yigit wrote: >> >> My expectation is numbers should be like following: >> >> Initially: >> size = 256 >> head = 0 >> tail = 0 >> >> In first refill:

Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx

2024-07-07 Thread Mihai Brodschi
On 07/07/2024 21:46, Mihai Brodschi wrote: > > > On 07/07/2024 18:18, Mihai Brodschi wrote: >> >> >> On 07/07/2024 17:05, Ferruh Yigit wrote: >>> >>> My expectation is numbers should be like following: >>> >>> Initially: >