Re: Fragment questions

2015-03-26 Thread Emeric POUPON
: Mercredi 25 Mars 2015 14:41:46 Objet: Re: Fragment questions 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

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,

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 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 h...@selasky.org 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

Re: Fragment questions

2015-03-24 Thread Emeric POUPON
2015 20:04:44 Objet: Re: Fragment questions On 20 March 2015 at 11:56, Hans Petter Selasky h...@selasky.org wrote: On 03/20/15 19:02, Adrian Chadd wrote: On 20 March 2015 at 10:58, Hans Petter Selasky h...@selasky.org wrote: On 03/20/15 14:31, Emeric POUPON wrote: - in the ip_newid macro

Re: Fragment questions

2015-03-20 Thread Emeric POUPON
:54:33 Objet: Re: Fragment questions 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

Re: Fragment questions

2015-03-20 Thread Adrian Chadd
On 20 March 2015 at 11:56, Hans Petter Selasky h...@selasky.org wrote: On 03/20/15 19:02, Adrian Chadd wrote: On 20 March 2015 at 10:58, Hans Petter Selasky h...@selasky.org 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

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 h...@selasky.org 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

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 Adrian Chadd
On 20 March 2015 at 10:58, Hans Petter Selasky h...@selasky.org 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

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

Fragment questions

2015-03-19 Thread Emeric POUPON
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 second fragment, etc.) - in the ip_newid