* [Cake] trivial patch for sch_cake.c
@ 2015-09-09 18:35 Loganaden Velvindron
2015-09-18 12:27 ` Loganaden Velvindron
0 siblings, 1 reply; 2+ messages in thread
From: Loganaden Velvindron @ 2015-09-09 18:35 UTC (permalink / raw)
To: cake
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
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);
[-- Attachment #2: Type: text/html, Size: 856 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Cake] trivial patch for sch_cake.c
2015-09-09 18:35 [Cake] trivial patch for sch_cake.c Loganaden Velvindron
@ 2015-09-18 12:27 ` Loganaden Velvindron
0 siblings, 0 replies; 2+ messages in thread
From: Loganaden Velvindron @ 2015-09-18 12:27 UTC (permalink / raw)
To: cake
[-- Attachment #1: Type: text/plain, Size: 936 bytes --]
On Wed, Sep 9, 2015 at 6:35 PM, Loganaden Velvindron <loganaden@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 :)
[-- Attachment #2: Type: text/html, Size: 1403 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-18 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 18:35 [Cake] trivial patch for sch_cake.c Loganaden Velvindron
2015-09-18 12:27 ` Loganaden Velvindron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox