> > > + *blh = unlikely(halign > 64) ? 1 : 0; > > This idiom of "(boolean condition) ? 1 : 0" looks odd to me... doesn't > > (halign > 64) already evaluate to 1 or 0 anyway? Does the unlikely() > > actually affect code generation here?
> True, (halign > 64) is the same and is cleaner. As for the unlikely() > -- well it's already been there and besides, we're never sure if it > will improve anything so the same question could be asked for other > places in the code. I was just wondering in this case where you are just assigning the boolean value of the expression to a variable how unlikely affects things. I can understand for conditional jumps how the compiler can choose to make the likely case more efficient, but when there are no jumps then I was just curious how the hint could help. > > I assume this initialization is to avoid a compiler warning. But the > > code is actually correct without initializing blh -- so I think that we > > save a tiny bit of code by doing uninitialized_var() instead? > We must initialize blh since it is used for any send request and not > just LSO opcodes. So then this patch was buggy because blh was not reinitialized as we loop through multiple work requests? eg an LSO request followed by a non-LSO request? Anyway I'll look over the newer patch. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html