[sheepdog] [PATCH] lib/net: fix CMD_FILTER branch never reached

Ruoyu liangry at ucweb.com
Tue Jul 29 07:52:33 CEST 2014


On 2014年07月29日 11:53, Liu Yuan wrote:
> On Tue, Jul 29, 2014 at 09:47:52AM +0800, Ruoyu wrote:
>> In the previous patch, SD_FLAG_CMD_FILTER is introduced. It should operate
>> both writing and reading, and what the client read is the subset of what
>> it write. Therefore, for least modification, SD_FLAG_CMD_FILTER is set to 0x11
>> (SD_FLAG_CMD_WRITE is 0x01).
> Set SD_FLAG_CMD_FILTER as 0x11 is wrong. All the macros are mutually exclusive
> in the SD_FLAG_CMD_XXX group and can be 'OR'ed together.
>
> By the way, the name FILTER doesn't make sense. What you want is return something
> back while you send something to sheep. How about
>
> #define SD_FLAG_CMD_PIGGYBACK 0x10
>
> Then if you .flag = SD_FLAG_CMD_PIGGYBACK | SD_FLAG_CMD_WRITE will serve you well
Good advise, thank you.
>
> Thanks
> Yuan





More information about the sheepdog mailing list