Re: [B.A.T.M.A.N.] Unused structs in Catwoman packet buffers

Antonio Quartulli
2011-10-17T16:37:55Z

Hello Martin,

and thank you for the explanation.

On Mon, Oct 17, 2011 at 03:16:25 +0200, Martin Hundebøll wrote:
> Now here's the question:
> When a list of a certain coding_path becomes empty, should I free the coding_path right away, or should I timestamp it and mark it for removal at a later time. The thing is that I don't know whether a new packet for the same coding_path will arrive in a short moment. If I have just freed the coding_path struct, I would have to spend ressources to initialize it again...
>
> It is probably a micro-optimiziation and the simplest solution would be to just free it right away, but I would like to have your comments anyways.

In my opinion it would be better to _keep_ the struct even if the corresponding
packet list is empty.

Imagine there are two packet flows going through a relay
node R. If the two coding paths of the two flows have an high coding correlation
at R (coding opportunity?), one of the two packet lists on R will be emptied
several times during the data transmission.

For this reason I think it would be better to wait a fixed time before freeing
such structure. The overhead given by the freeing/reallocating/reinitialising
operation could become not negligible.

I hope that I correctly understood the problem and that my idea was clear :-)

Cheers,

--
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara