Hi Andrew,
On Mon, Jun 27, 2011 at 07:33:19AM +0200, Andrew Lunn wrote:
Hi Antonio
/* NOPURGE flag has not to go on the wire */
flags &= ~TT_CLIENT_NOPURGE;
tt_change_node->change.flags = flags;
I don't remember the packet format. But i assume flags on the wire is a u8? How about making TT_CLIENT_NOPURGE 1<<8 or bigger, so it is automatically not sent on the wire? It will also make it easier sometime in the future when you want to use the bit on the wire that TT_CLIENT_NOPURGE is currently taking.
Even if we want to add other flags that don't need to be sent on the wire. I like this idea.
We can have a uint16_t flags field in the tt_local/global_entry structure, where the 8 tailing bits only are sent within the messages. Instead, the 8 leading bits are reserved for local purposes.
You might also want to change the function parameters flags from int to uint, so avoiding sign extension problems.
Yes, thanks!
Andrew