erspan: add erspan version II support
Subsystems (2)
PATCH v2 1/1 erspan: add erspan version II support
The patch adds support for configuring the erspan v2, for both ipv4 and ipv6 erspan implementation. Three additional fields are added: 'erspan_ver' for distinguishing v1 or v2, 'erspan_dir' for specifying direction of the mirrored traffic, and 'erspan_hwid' for users to set ERSPAN engine ID within a system.
As for manpage, the ERSPAN descriptions used to be under GRE, IPIP, SIT Type paragraph. Since IP6GRE/IP6GRETAP also supports ERSPAN, the patch removes the old one, creates a separate ERSPAN paragrah, and adds an example.
---
change in v2:
- clean up and update manpage.
--- include/uapi/linux/if_ether.h | 1 + include/uapi/linux/if_tunnel.h | 3 ++ ip/link_gre.c | 59 ++++++++++++++++++++++++-- ip/link_gre6.c | 61 +++++++++++++++++++++++++-- man/man8/ip-link.8.in | 94 ++++++++++++++++++++++++++++++++++++------ 5 files changed, 199 insertions(+), 19 deletions(-)
include/uapi/linux/if_ether.h +1 -0
@@ -47,6 +47,7 @@#define ETH_P_PUP 0x0200/* Xerox PUP packet */ #define ETH_P_PUPAT 0x0201/* Xerox PUP Addr Trans packet */ #define ETH_P_TSN 0x22F0/* TSN (IEEE 1722) packet */ +#define ETH_P_ERsPAN2 0x22EB/* ERSPAN version 2 (type III) */ #define ETH_P_IP 0x0800/* Internet Protocol packet */ #define ETH_P_X25 0x0805/* CCITT X.25 */ #define ETH_P_ARP 0x0806/* Address Resolution packet */
include/uapi/linux/if_tunnel.h +3 -0
@@ -137,6 +137,9 @@ enum {IFLA_GRE_IGNORE_DF ,IFLA_GRE_FWMARK ,IFLA_GRE_ERSPAN_INDEX , +IFLA_GRE_ERSPAN_VER , +IFLA_GRE_ERSPAN_DIR , +IFLA_GRE_ERSPAN_HWID , __IFLA_GRE_MAX, };
ip/link_gre.c +56 -3
89 lines not on this page · raw message
ip/link_gre6.c +57 -4
93 lines not on this page · raw message
man/man8/ip-link.8.in +82 -12
128 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 28 lines · William Tu
The patch adds support for configuring the erspan v2, for both ipv4 and ipv6 erspan implementation. Three additional fields are added: '
erspan_ver' for distinguishing v1 or v2, 'erspan_dir' for specifying direction of the mirrored traffic, and 'erspan_hwid' for users to set ERSPAN engine ID within a system.As for manpage, the ERSPAN descriptions used to be under GRE, IPIP, SIT Type paragraph. Since IP6GRE/IP6GRETAP also supports ERSPAN, the patch removes the old one, creates a separate ERSPAN paragrah, and adds an example.
Signed-off-by William Tu <[email protected]>---
change in v2:
- clean up and update manpage.--- include/uapi/linux/if_ether.h | 1 + include/uapi/linux/if_tunnel.h | 3 ++ ip/link_gre.c | 59 ++++++++++++++++++++++++-- ip/link_gre6.c | 61 +++++++++++++++++++++++++-- man/man8/ip-link.8.in | 94 ++++++++++++++++++++++++++++++++++++------ 5 files changed, 199 insertions(+), 19 deletions(-)include/uapi/linux/if_ether.h +0
-0
include/uapi/linux/if_ether.h line 50
Quoted 4 lines
include/uapi/linux/if_ether.h +1
-0@@ -47,6 +47,7 @@#define ETH_P_PUP 0x0200/* Xerox PUP packet */ #define ETH_P_PUPAT 0x0201/* Xerox PUP Addr Trans packet */ #define ETH_P_TSN 0x22F0/* TSN (IEEE 1722) packet */ +#define ETH_P_ERsPAN2 0x22EB/* ERSPAN version 2 (type III) */
^ Is it intention to have a lower case 's' in macro name or typo?
[...]
Quoted 36 lines · Roman Mashak
Quoted 28 lines · William Tu
The patch adds support for configuring the erspan v2, for both ipv4 and ipv6 erspan implementation. Three additional fields are added: '
erspan_ver' for distinguishing v1 or v2, 'erspan_dir' for specifying direction of the mirrored traffic, and 'erspan_hwid' for users to set ERSPAN engine ID within a system.As for manpage, the ERSPAN descriptions used to be under GRE, IPIP, SIT Type paragraph. Since IP6GRE/IP6GRETAP also supports ERSPAN, the patch removes the old one, creates a separate ERSPAN paragrah, and adds an example.
Signed-off-by William Tu <[email protected]>---
change in v2:
- clean up and update manpage.--- include/uapi/linux/if_ether.h | 1 + include/uapi/linux/if_tunnel.h | 3 ++ ip/link_gre.c | 59 ++++++++++++++++++++++++-- ip/link_gre6.c | 61 +++++++++++++++++++++++++-- man/man8/ip-link.8.in | 94 ++++++++++++++++++++++++++++++++++++------ 5 files changed, 199 insertions(+), 19 deletions(-)include/uapi/linux/if_ether.h +0
-0include/uapi/linux/if_ether.h line 50
Quoted 4 lines
include/uapi/linux/if_ether.h +1
-0@@ -47,6 +47,7 @@#define ETH_P_PUP 0x0200/* Xerox PUP packet */ #define ETH_P_PUPAT 0x0201/* Xerox PUP Addr Trans packet */ #define ETH_P_TSN 0x22F0/* TSN (IEEE 1722) packet */ +#define ETH_P_ERsPAN2 0x22EB/* ERSPAN version 2 (type III) */ ^ Is it intention to have a lower case 's' in macro name or typo?
Quoted 1 line
[...]
Sorry, that's my mistake. Let me fix it and resubmit. Thank you.
William