Dnia Wednesday 16 of April 2008, Gerrit Renker napisał:
What you proposed in the patch should work ok for qpolicies for now. But
sooner or later the need to add a field to struct dccp_skb_cb will arise. So
maybe we should think about it now...
Other possibility apart from what you proposed in the patch is creating struct
dccp_skb_cb_ext, move to it some fields from struct dccp_skb_cb and in struct
add a pointer to this new struct dccp_skb_cb_ext. Ok, maybe it is not the
prettiest idea but in case somebody needs yet another additional field in
struct dccp_skb_cb_ext it would be nice to have an idea how to do it.
While we are developing in the test tree compatibility is not important at
all. But real world needs compatibility, especially if it's not that
expensive. Otherwise people will get weird behaviour without any messages
indicating what is wrong. And it's certainly not how code should be written.
It can't be that binary package of VLC (or any other streaming server) cannot
use newer kernel version because we added a new field.
Putting any of those values in an integer is pretty straightforward. But when
you want to put both timeout and priority things get messy. Would it be
possible at least to use structure like that:
struct dccp_packet_info
{
s8 priority;
u16 timeout_mantissa:10;
u16 timeout_exponent:6;
}
? That would still fit in 32-bit integer (so could be stored in
skb->priority), but would provide a much cleaner interface.
--
Regards,
Tomasz Grobelny
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html