[Cake] trivial patch for sch_cake.c

Loganaden Velvindron loganaden at gmail.com
Fri Sep 18 08:27:03 EDT 2015


On Wed, Sep 9, 2015 at 6:35 PM, Loganaden Velvindron <loganaden at gmail.com>
wrote:

> Hi guys,
>
> Here's a trivial patch to fix a warning with gcc 5.2, as 1 isn't casted
> before being compared with an unsigned integer. Diff below:
>
> diff --git a/sch_cake.c b/sch_cake.c
> index 3ed18d7..aab0fe3 100644
> --- a/sch_cake.c
> +++ b/sch_cake.c
> @@ -436,7 +436,7 @@ static int cake_enqueue(struct sk_buff *skb, struct Qdisc *sch)
>  	 * Split GSO aggregates if they're likely to impair flow isolation
>  	 * or if we need to know individual packet sizes for framing overhead.
>  	 */
> -	if(unlikely((len * max(fqcd->flow_count, 1) > q->peel_threshold && skb_is_gso(skb))))
> +	if(unlikely((len * max(fqcd->flow_count, (u32)1) > q->peel_threshold && skb_is_gso(skb))))
>  	{
>  		struct sk_buff *segs, *nskb;
>  		netdev_features_t features = netif_skb_features(skb);
>
>
>
Hi Chromi@,

Thanks for fixing that, but in a different way :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20150918/3d05e01d/attachment-0002.html>


More information about the Cake mailing list