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

2024-10-09 Thread Ferruh Yigit
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, but the alloc function doesn't implement index > wrap-around, so it writes past the end

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

2024-10-09 Thread Ferruh Yigit
On 8/31/2024 2:38 PM, Mihai Brodschi wrote: > Hi Ferruh, > > Apologies for the late response. > I've run some performance tests for the two proposed solutions. > In the tables below, the rte_memcpy results correspond to this patch. > The 2xpktmbuf_alloc results correspond to the other proposed sol

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

2024-08-31 Thread Mihai Brodschi
Hi Ferruh, Apologies for the late response. I've run some performance tests for the two proposed solutions. In the tables below, the rte_memcpy results correspond to this patch. The 2xpktmbuf_alloc results correspond to the other proposed solution. bash commands: server# ./dpdk-testpmd --vdev=net

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

2024-07-19 Thread Ferruh Yigit
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: On 07/07/2024 17:05, Ferruh Yigit wrote: > > My expectation is numbers should be l

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

2024-07-08 Thread Ferruh Yigit
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: >>> >>> >>> On 07/07/2024 17:05, Ferruh Yigit wrote: My expectation is numbers should be like following: Initially: size = 256

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: >>> 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 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: >> n_slots = 256 >> head = 256 >> tail = 0 >> >> Subsequent ru

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 receiver to allocate new mbufs to be prov

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

2024-07-07 Thread Ferruh Yigit
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 receiver to allocate >>> new mbufs to be provided to the sender. The allocated mbuf pointers >>

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, but the alloc function doesn'

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, but the alloc function doesn'

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

2024-07-06 Thread Ferruh Yigit
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, but the alloc function doesn't implement index > wrap-around, so it writes past the end

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

2024-06-30 Thread Patrick Robb
I see this patchseries had a CI testing fail, for coremask DTS test on Marvel CN10k. I don't think it could relate to the contents of your patch though. It had a timeout: TestCoremask: Test Case test_individual_coremask Result FAILED: TIMEOUT on ./arm64-native-linuxapp-gcc/app/test/dpdk-test -c

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

2024-06-28 Thread Mihai Brodschi
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, but the alloc function doesn't implement index wrap-around, so it writes past the end of the array. This results in memory corruption and