From: Sunil Goutham <sgoutham@marvell.com>
Some NICs share resources like packet filters across
multiple interfaces they support. From HW point of view
it is possible to use all filters for a single interface.
Currently ethtool doesn't support modifying filter count so
that user can allocate more filters to a interface and less
to others. This patch adds ETHTOOL_SRXCLSRLCNT ioctl command
for modifying filter count.
example command:
./ethtool -U eth0 rule-count 256
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
---
include/uapi/linux/ethtool.h | 1 +
net/ethtool/ioctl.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index cfef6b0..2f16a07 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1552,6 +1552,7 @@ enum ethtool_fec_config_bits {
#define ETHTOOL_PHY_STUNABLE 0x0000004f /* Set PHY tunable configuration */
#define ETHTOOL_GFECPARAM 0x00000050 /* Get FEC settings */
#define ETHTOOL_SFECPARAM 0x00000051 /* Set FEC settings */
+#define ETHTOOL_SRXCLSRLCNT 0x00000052 /* Set RX class rule count */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSETdiff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 3fa7a39..ced4a02 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -2759,6 +2759,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_SRXFH:
case ETHTOOL_SRXCLSRLDEL:
case ETHTOOL_SRXCLSRLINS:
+ case ETHTOOL_SRXCLSRLCNT:
rc = ethtool_set_rxnfc(dev, ethcmd, useraddr);
break;
case ETHTOOL_FLASHDEV:
--
2.7.4