linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm@ti.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <linux-api@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Mugunthan V N <mugunthanvnm@ti.com>
Subject: [net-next PATCH v2 1/3] net: ethtool: Add Multicast and broadcast rate limit coalescing feature
Date: Wed, 9 Jul 2014 12:44:08 +0530	[thread overview]
Message-ID: <1404890050-4020-2-git-send-email-mugunthanvnm@ti.com> (raw)
In-Reply-To: <1404890050-4020-1-git-send-email-mugunthanvnm@ti.com>

Add ability to limit the broadcast or multicast packets to prevent
the loading of the CPU by a hacker with a broadcast or multicast
packet flood.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 include/uapi/linux/ethtool.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index e3c7a71..96ade34 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -350,6 +350,8 @@ struct ethtool_modinfo {
  *	a TX interrupt, when the packet rate is above @pkt_rate_high.
  * @rate_sample_interval: How often to do adaptive coalescing packet rate
  *	sampling, measured in seconds.  Must not be zero.
+ * @rx_max_mcast: Threshold for high multicast packet rate (packets per second)
+ * @rx_max_bcast: Threshold for high broadcast packet rate (packets per second)
  *
  * Each pair of (usecs, max_frames) fields specifies that interrupts
  * should be coalesced until
@@ -400,6 +402,8 @@ struct ethtool_coalesce {
 	__u32	tx_coalesce_usecs_high;
 	__u32	tx_max_coalesced_frames_high;
 	__u32	rate_sample_interval;
+	__u32	rx_max_mcast;
+	__u32	rx_max_bcast;
 };
 
 /**
-- 
2.0.0.390.gcb682f8


  reply	other threads:[~2014-07-09  7:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09  7:14 [net-next PATCH v2 0/3] Broadcast/Multicast rate limit via Ethtool Coalesce Mugunthan V N
2014-07-09  7:14 ` Mugunthan V N [this message]
2014-07-09  7:14 ` [net-next PATCH v2 2/3] drivers: net: cpsw: remove redundancy check Mugunthan V N
2014-07-09  7:14 ` [net-next PATCH v2 3/3] drivers: net: cpsw: Add support for multicast/broadcast rate limit Mugunthan V N
2014-07-09 13:39   ` Govindarajulu Varadarajan
2014-07-09 23:44 ` [net-next PATCH v2 0/3] Broadcast/Multicast rate limit via Ethtool Coalesce David Miller
2014-07-17  6:13   ` Mugunthan V N
2014-07-17 12:53     ` David Laight
2014-07-18  5:37       ` Mugunthan V N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404890050-4020-2-git-send-email-mugunthanvnm@ti.com \
    --to=mugunthanvnm@ti.com \
    --cc=davem@davemloft.net \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).