Add support for RX packet classification in a network device
Subsystems (3)
PATCH 1/3 Add support for RX packet classification in a network device
From: Santwona Behera <[email protected]>
Subject: [PATCH 1/3] [ethtool] Add rx pkt classification interface
Signed-off-by Santwona Behera <[email protected]>
--- Makefile.am | 2 +- ethtool-copy.h | 88 +++++- ethtool-util.h | 12 + ethtool.8 | 138 ++++++++- ethtool.c | 153 ++++++++-- rxclass.c | 969 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1331 insertions(+), 31 deletions(-) create mode 100644 rxclass.c
Makefile.am +1 -1
@@ -8,7 +8,7 @@ ethtool_SOURCES = ethtool.c ethtool-copy.h ethtool-util.h \ amd8111e.c de2104x.c e100.c e1000.c igb.c \ fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c \ pcnet32.c realtek.c tg3.c marvell.c vioc.c \ - smsc911x.c + smsc911x.c rxclass.c dist-hook: cp $(top_srcdir)/ethtool.spec $(distdir)
ethtool-copy.h +84 -4
125 lines not on this page · raw message
ethtool-util.h +12 -0
@@ -73,4 +73,16 @@ int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);/* SMSC LAN911x/LAN921x embedded ethernet controller */ int smsc911x_dump_regs (struct ethtool_drvinfo *info,struct ethtool_regs *regs); +/* Rx flow classification */ +#include <sys/ioctl.h> +#include <net/if.h> + +int rxclass_parse_ruleopts (char **optstr,int opt_cnt, +struct ethtool_rx_flow_spec *fsp,__u8 *loc_valid); +int rxclass_rule_getall (int fd,struct ifreq *ifr); +int rxclass_rule_get (int fd,struct ifreq *ifr,__u32 loc); +int rxclass_rule_ins (int fd,struct ifreq *ifr, +struct ethtool_rx_flow_spec *fsp,__u8 loc_valid); +int rxclass_rule_del (int fd,struct ifreq *ifr,__u32 loc); +#endif
ethtool.8 +132 -6
184 lines not on this page · raw message
ethtool.c +133 -20
266 lines not on this page · raw message
rxclass.c new file +969 -0
969 lines not on this page · raw message
Signature · 1 line
1.5.2