Skip to contentSkip to conversation

gianfar: Clean up implementation of RX network flow classification

PATCH Applied Ben Hutchings 2 participants 2 messages Apr 8, 2011 – Apr 11, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gianfar: Clean up implementation of RX network flow classification

This code was cribbed from niu, so gfar_set_hash_opts() begins by converting the ethtool flow class code into a class code for Sun Neptune hardware, then does the same thing again for the hardware it's really dealing with. It may also return -1 (-EPERM) for some unhandled ethtool flow class codes.

Remove the useless code and definitions, and fix the error code.

---
This isn't even compile-tested, since it can only be built for some PowerPC SoCs. Could someone on ppc-dev check that this won't break the driver?

Ben.

 drivers/net/gianfar.h         |   17 -------------
 drivers/net/gianfar_ethtool.c |   52 +----------------------------------------
 2 files changed, 1 insertions(+), 68 deletions(-)
drivers/net/gianfar.h +0 -17
index ec5d595..57ee3b0 100644
@@ -382,23 +382,6 @@ extern const char gfar_driver_version[];
 #define BD_LFLAG(flags) ((flags) << 16)
 #define BD_LENGTH_MASK		0x0000ffff
 
-#define CLASS_CODE_UNRECOG		0x00
-#define CLASS_CODE_DUMMY1		0x01
-#define CLASS_CODE_ETHERTYPE1		0x02
-#define CLASS_CODE_ETHERTYPE2		0x03
-#define CLASS_CODE_USER_PROG1		0x04
-#define CLASS_CODE_USER_PROG2		0x05
-#define CLASS_CODE_USER_PROG3		0x06
-#define CLASS_CODE_USER_PROG4		0x07
-#define CLASS_CODE_TCP_IPV4		0x08
-#define CLASS_CODE_UDP_IPV4		0x09
-#define CLASS_CODE_AH_ESP_IPV4		0x0a
-#define CLASS_CODE_SCTP_IPV4		0x0b
-#define CLASS_CODE_TCP_IPV6		0x0c
-#define CLASS_CODE_UDP_IPV6		0x0d
-#define CLASS_CODE_AH_ESP_IPV6		0x0e
-#define CLASS_CODE_SCTP_IPV6		0x0f
-
 #define FPR_FILER_MASK	0xFFFFFFFF
 #define MAX_FILER_IDX	0xFF
 
drivers/net/gianfar_ethtool.c +1 -51

72 lines not on this page · raw message

Signature · 8 lines
1.7.4



-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
maintainer
#1 lore raw

From: Ben Hutchings <[email protected]>
Date: Sat, 09 Apr 2011 00:45:11 +0100

Quoted 6 lines

This code was cribbed from niu, so gfar_set_hash_opts() begins by converting the ethtool flow class code into a class code for Sun Neptune hardware, then does the same thing again for the hardware it's really dealing with. It may also return -1 (-EPERM) for some unhandled ethtool flow class codes.

Quoted 7 lines

Remove the useless code and definitions, and fix the error code.

---
This isn't even compile-tested, since it can only be built for some PowerPC SoCs. Could someone on ppc-dev check that this won't break the driver?

I'm applying this, it looks so trivial to me that I'm willing to take the build risk :-)

Thanks.