[PATCH 1/1] Add new TCP and IP functions

Josh Stone jistone@redhat.com
Mon Apr 13 19:30:00 GMT 2009


Breno Leitao wrote:
> Josh Stone wrote:
>>> +/* returns TCP URG flag for a given sk_buff structure */
>>> +function __tcp_skb_urg:long (skb:long){
>>> +	urg = ntohs(@cast(__get_skb_tcphdr(skb), "tcphdr")->urg) & 32
>>> +	return urg >> 5
>>> +}
>> Such bit-manipulation shouldn't be needed, but it looks like our
>> generated dereference code is not masking out bitfields correctly.  I'll
>> file a bugzilla on this.
> 
> That is right. So, should I wait until it's fixed, or just let it as it is ?

It's bug #10067.  I'm ok to commit your workarounds, as long as we make
sure to adjust it again when the bug is fixed.

One more review point I forgot: your embedded-C functions should contain
the comment "/* pure */" so our optimizer knows that they don't have any
side effects.

Thanks,

Josh



More information about the Systemtap mailing list