This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 1/1] Add new TCP and IP functions
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