lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 May 2012 11:28:50 +0200
From:	Hagen Paul Pfeifer <hagen@...u.net>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Tom Herbert <therbert@...gle.com>,
	Neal Cardwell <ncardwell@...gle.com>,
	Stephen Hemminger <shemminger@...tta.com>
Subject: Re: [PATCH net-next] netem: add ECN capability

Nice!


* Eric Dumazet | 2012-05-01 11:11:05 [+0200]:

> 	u32 loss;
>+	u32 ecn;

Why no bool here Eric?

> 	u32 limit;
> 	u32 counter;
> 	u32 gap;
>@@ -374,9 +376,12 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
> 		++count;
> 
> 	/* Drop packet? */
>-	if (loss_event(q))
>-		--count;
>-
>+	if (loss_event(q)) {
>+		if (q->ecn && INET_ECN_set_ce(skb))
>+			sch->qstats.drops++; /* mark packet */
>+		else
>+			--count;
>+	}
> 	if (count == 0) {
> 		sch->qstats.drops++;
> 		kfree_skb(skb);
>@@ -706,6 +711,7 @@ static const struct nla_policy netem_policy[TCA_NETEM_MAX + 1] = {
> 	[TCA_NETEM_CORRUPT]	= { .len = sizeof(struct tc_netem_corrupt) },
> 	[TCA_NETEM_RATE]	= { .len = sizeof(struct tc_netem_rate) },
> 	[TCA_NETEM_LOSS]	= { .type = NLA_NESTED },
>+	[TCA_NETEM_ECN]		= { .type = NLA_U32 },

This netem API, what a heck ... Ideal we would extend TCA_NETEM_LOSS
somehow[tm], but yes ... ;(

Acked-by: Hagen Paul Pfeifer <hagen@...u.net>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ