Re: Fragment questions

2015-03-26 Thread Emeric POUPON
Ok for the function. Please find the review here: https://reviews.freebsd.org/D2141 Regards, Emeric - Mail original - De: "Hans Petter Selasky" À: "Emeric POUPON" , "Adrian Chadd" Cc: "freebsd-net" Envoyé: Mercredi 25 Mars 2015 14:41:46 Objet

Re: Fragment questions

2015-03-25 Thread John-Mark Gurney
Hans Petter Selasky wrote this message on Fri, Mar 20, 2015 at 19:56 +0100: > On 03/20/15 19:02, Adrian Chadd wrote: > > On 20 March 2015 at 10:58, Hans Petter Selasky wrote: > >> On 03/20/15 14:31, Emeric POUPON wrote: > >>> > >>> - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not us

Re: Fragment questions

2015-03-25 Thread Bruce Evans
On Wed, 25 Mar 2015, Hans Petter Selasky wrote: On 03/24/15 10:26, Emeric POUPON wrote: Please find attached a proposal using atomic_fetchadd. ... I think however we should define the code like a function, because the htons() might be a macro, referring the input argument multiple times ...

Re: Fragment questions

2015-03-25 Thread Hans Petter Selasky
On 03/24/15 10:26, Emeric POUPON wrote: Hello, Please find attached a proposal using atomic_fetchadd. Best Regards, Emeric Hi, Your proposal using atomic_fetchadd() looks fine to me. I think however we should define the code like a function, because the htons() might be a macro, referring

Re: Fragment questions

2015-03-24 Thread Emeric POUPON
Hello, Please find attached a proposal using atomic_fetchadd. Best Regards, Emeric - Mail original - De: "Adrian Chadd" À: "Hans Petter Selasky" Cc: "Emeric POUPON" , "freebsd-net" Envoyé: Vendredi 20 Mars 2015 20:04:44 Objet: Re: Fragment qu

Re: Fragment questions

2015-03-20 Thread Adrian Chadd
On 20 March 2015 at 11:56, Hans Petter Selasky wrote: > On 03/20/15 19:02, Adrian Chadd wrote: >> >> On 20 March 2015 at 10:58, Hans Petter Selasky wrote: >>> >>> On 03/20/15 14:31, Emeric POUPON wrote: - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use random

Re: Fragment questions

2015-03-20 Thread Hans Petter Selasky
On 03/20/15 19:02, Adrian Chadd wrote: On 20 March 2015 at 10:58, Hans Petter Selasky wrote: On 03/20/15 14:31, Emeric POUPON wrote: - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use randomized id. In multi core systems, we may emit successive packets with the same id.

Re: Fragment questions

2015-03-20 Thread Adrian Chadd
On 20 March 2015 at 10:58, Hans Petter Selasky wrote: > On 03/20/15 14:31, Emeric POUPON wrote: >> >> - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use >> randomized id. > >> In multi core systems, we may emit successive packets with the same id. > > Will using a mutex or an atom

Re: Fragment questions

2015-03-20 Thread Hans Petter Selasky
On 03/20/15 14:31, Emeric POUPON wrote: - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use randomized id. > In multi core systems, we may emit successive packets with the same id. Will using a mutex or an atomic macro fix this issue when incrementing the V_ip_id ? --HPS ___

Re: Fragment questions

2015-03-20 Thread Hans Petter Selasky
On 03/20/15 14:31, Emeric POUPON wrote: Hello, Yes indeed, it has already been fixed! However, the second point seems to be still here... Regards, Emeric Can you suggest a patch for the second issue? --HPS ___ freebsd-net@freebsd.org mailing lis

Re: Fragment questions

2015-03-20 Thread Emeric POUPON
Hello, Yes indeed, it has already been fixed! However, the second point seems to be still here... Regards, Emeric - Mail original - De: "Hans Petter Selasky" À: "Emeric POUPON" , "freebsd-net" Envoyé: Jeudi 19 Mars 2015 13:54:33 Objet: Re: Fragmen

Re: Fragment questions

2015-03-19 Thread Hans Petter Selasky
On 03/19/15 12:38, Emeric POUPON wrote: Hello, I noticed two questionable things in the fragmentation code: - in ip_fragment, we do not copy the flowid from the original mbuf to the fragmented mbuf. Therefore we may output very desynchronized fragments (first fragment emitted far later the sec