From: Qi Zhang <qi.z.zhang@intel.com>
To: adrien.mazarguil@6wind.com
Cc: dev@dpdk.org, declan.doherty@intel.com,
sugesh.chandran@intel.com, michael.j.glynn@intel.com,
yu.y.liu@intel.com, konstantin.ananyev@intel.com,
bruce.richardson@intel.com, Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v3 1/4] ethdev: add more protocol support in flow API
Date: Mon, 16 Apr 2018 13:16:36 +0800 [thread overview]
Message-ID: <20180416051639.188034-2-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20180416051639.188034-1-qi.z.zhang@intel.com>
Add new protocol header match support as below
RTE_FLOW_ITEM_TYPE_ARP_IPV4
- matches an IPv4 ARP header
RTE_FLOW_ITEM_TYPE_IPV6_EXT
- matches an IPv6 extension header with any type.
RTE_FLOW_ITEM_TYPE_ICMP6
- matches an ICMPv6 header followed by any message body.
RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS
- matches an ICMPv6 header followed by network discovery
neighbor solicitation.
RTE_FLOW_ITEM_TYPE_ICMP6_ND_NA
- matches an ICMPv6 header followed by network discovery
neighbor advertisement.
RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_ETH_SLA
- matches an ICMPv6 header followed by network discovery
neighbor solicitation contains source Ethernet link-layer
address option.
RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_ETH_TLA
- matches an ICMPv6 header followed by network discovery
neighbor advertisement contains target Ethernet link-layer
address option.
Suggested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
app/test-pmd/cmdline_flow.c | 174 +++++++++++++++++++++
app/test-pmd/config.c | 8 +
doc/guides/prog_guide/rte_flow.rst | 72 +++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 27 ++++
lib/librte_ether/rte_flow.h | 231 ++++++++++++++++++++++++++++
5 files changed, 512 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 59f3b3b57..a5e21c1fe 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -150,6 +150,21 @@ enum index {
ITEM_GENEVE,
ITEM_GENEVE_VNI,
ITEM_GENEVE_PROTO,
+ ITEM_IPV6_EXT,
+ ITEM_IPV6_EXT_NEXT_HDR,
+ ITEM_ICMP6,
+ ITEM_ICMP6_TYPE,
+ ITEM_ICMP6_CODE,
+ ITEM_ICMP6_ND_NS,
+ ITEM_ICMP6_ND_NS_TGT_ADDR,
+ ITEM_ICMP6_ND_NA,
+ ITEM_ICMP6_ND_NA_TGT_ADDR,
+ ITEM_ICMP6_ND_OPT_SLA_ETH,
+ ITEM_ICMP6_ND_OPT_SLA_ETH_TGT_ADDR,
+ ITEM_ICMP6_ND_OPT_SLA_ETH_SLL_ADDR,
+ ITEM_ICMP6_ND_OPT_TLA_ETH,
+ ITEM_ICMP6_ND_OPT_TLA_ETH_TGT_ADDR,
+ ITEM_ICMP6_ND_OPT_TLA_ETH_TLL_ADDR,
/* Validate/create actions. */
ACTIONS,
@@ -436,6 +451,12 @@ static const enum index next_item[] = {
ITEM_GTPC,
ITEM_GTPU,
ITEM_GENEVE,
+ ITEM_IPV6_EXT,
+ ITEM_ICMP6,
+ ITEM_ICMP6_ND_NS,
+ ITEM_ICMP6_ND_NA,
+ ITEM_ICMP6_ND_OPT_SLA_ETH,
+ ITEM_ICMP6_ND_OPT_TLA_ETH,
ZERO,
};
@@ -586,6 +607,39 @@ static const enum index item_geneve[] = {
ZERO,
};
+static const enum index item_ipv6_ext[] = {
+ ITEM_IPV6_EXT_NEXT_HDR,
+ ZERO,
+};
+
+static const enum index item_icmp6[] = {
+ ITEM_ICMP6_TYPE,
+ ITEM_ICMP6_CODE,
+ ZERO,
+};
+
+static const enum index item_icmp6_nd_ns[] = {
+ ITEM_ICMP6_ND_NS_TGT_ADDR,
+ ZERO,
+};
+
+static const enum index item_icmp6_nd_na[] = {
+ ITEM_ICMP6_ND_NA_TGT_ADDR,
+ ZERO,
+};
+
+static const enum index item_icmp6_nd_opt_sla_eth[] = {
+ ITEM_ICMP6_ND_OPT_SLA_ETH_TGT_ADDR,
+ ITEM_ICMP6_ND_OPT_SLA_ETH_SLL_ADDR,
+ ZERO,
+};
+
+static const enum index item_icmp6_nd_opt_tla_eth[] = {
+ ITEM_ICMP6_ND_OPT_TLA_ETH_TGT_ADDR,
+ ITEM_ICMP6_ND_OPT_TLA_ETH_TLL_ADDR,
+ ZERO,
+};
+
static const enum index next_action[] = {
ACTION_END,
ACTION_VOID,
@@ -1473,6 +1527,126 @@ static const struct token token_list[] = {
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve,
protocol)),
},
+ [ITEM_IPV6_EXT] = {
+ .name = "ext",
+ .help = "match IPv6 extend header",
+ .priv = PRIV_ITEM(IPV6_EXT,
+ sizeof(struct rte_flow_item_ipv6_ext)),
+ .next = NEXT(item_ipv6_ext),
+ .call = parse_vc,
+ },
+ [ITEM_IPV6_EXT_NEXT_HDR] = {
+ .name = "next",
+ .help = "next header in IPv6 extend header",
+ .next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
+ next_hdr)),
+ },
+ [ITEM_ICMP6] = {
+ .name = "icmp6",
+ .help = "match ICMPv6 header",
+ .priv = PRIV_ITEM(ICMP, sizeof(struct rte_flow_item_icmp6)),
+ .next = NEXT(item_icmp6),
+ .call = parse_vc,
+ },
+ [ITEM_ICMP6_TYPE] = {
+ .name = "type",
+ .help = "ICMPv6 packet type",
+ .next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
+ type)),
+ },
+ [ITEM_ICMP6_CODE] = {
+ .name = "code",
+ .help = "ICMPv6 packet code",
+ .next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
+ code)),
+ },
+ [ITEM_ICMP6_ND_NS] = {
+ .name = "ns",
+ .help = "match neighbor solicitation over ICMPv6 ",
+ .priv = PRIV_ITEM(ICMP6_ND_NS,
+ sizeof(struct rte_flow_item_icmp6_nd_ns)),
+ .next = NEXT(item_icmp6_nd_ns),
+ .call = parse_vc,
+ },
+ [ITEM_ICMP6_ND_NS_TGT_ADDR] = {
+ .name = "tgt_addr",
+ .help = "target address of neighbor solicitation",
+ .next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
+ target_addr)),
+ },
+ [ITEM_ICMP6_ND_NA] = {
+ .name = "na",
+ .help = "match neighbor advertisement over ICMPv6 ",
+ .priv = PRIV_ITEM(ICMP6_ND_NA,
+ sizeof(struct rte_flow_item_icmp6_nd_na)),
+ .next = NEXT(item_icmp6_nd_na),
+ .call = parse_vc,
+ },
+ [ITEM_ICMP6_ND_NA_TGT_ADDR] = {
+ .name = "tgt_addr",
+ .help = "target address of neighbor advertisement",
+ .next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
+ target_addr)),
+ },
+ [ITEM_ICMP6_ND_OPT_SLA_ETH] = {
+ .name = "sla",
+ .help = "match source link-layer address over neighbor solicitation",
+ .priv = PRIV_ITEM(ICMP6_ND_OPT_SLA_ETH,
+ sizeof(struct rte_flow_item_icmp6_nd_opt_sla_eth)),
+ .next = NEXT(item_icmp6_nd_opt_sla_eth),
+ .call = parse_vc,
+ },
+ [ITEM_ICMP6_ND_OPT_SLA_ETH_TGT_ADDR] = {
+ .name = "tgt_addr",
+ .help = "target address of neighbor solicitation",
+ .next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(
+ struct rte_flow_item_icmp6_nd_opt_sla_eth,
+ target_addr)),
+ },
+ [ITEM_ICMP6_ND_OPT_SLA_ETH_SLL_ADDR] = {
+ .name = "sll_addr",
+ .help = "source link-layer address over neighbor solicitation",
+ .next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(
+ struct rte_flow_item_icmp6_nd_opt_sla_eth,
+ sll_addr)),
+ },
+ [ITEM_ICMP6_ND_OPT_TLA_ETH] = {
+ .name = "tla",
+ .help = "match target link-layer address over neighbor advertisement",
+ .priv = PRIV_ITEM(ICMP6_ND_OPT_TLA_ETH,
+ sizeof(struct rte_flow_item_icmp6_nd_opt_tla_eth)),
+ .next = NEXT(item_icmp6_nd_opt_tla_eth),
+ .call = parse_vc,
+ },
+ [ITEM_ICMP6_ND_OPT_TLA_ETH_TGT_ADDR] = {
+ .name = "tgt_addr",
+ .help = "target address of neighbor advertisement",
+ .next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(
+ struct rte_flow_item_icmp6_nd_opt_tla_eth,
+ target_addr)),
+ },
+ [ITEM_ICMP6_ND_OPT_TLA_ETH_TLL_ADDR] = {
+ .name = "tll_addr",
+ .help = "target link-layer address over neighbor advertisement",
+ .next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(
+ struct rte_flow_item_icmp6_nd_opt_tla_eth,
+ tll_addr)),
+ },
/* Validate/create actions. */
[ACTIONS] = {
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 4bb255c62..4cd56bf26 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -980,6 +980,14 @@ static const struct {
MK_FLOW_ITEM(GTPC, sizeof(struct rte_flow_item_gtp)),
MK_FLOW_ITEM(GTPU, sizeof(struct rte_flow_item_gtp)),
MK_FLOW_ITEM(GENEVE, sizeof(struct rte_flow_item_geneve)),
+ MK_FLOW_ITEM(IPV6_EXT, sizeof(struct rte_flow_item_ipv6_ext)),
+ MK_FLOW_ITEM(ICMP6, sizeof(struct rte_flow_item_icmp6)),
+ MK_FLOW_ITEM(ICMP6_ND_NS, sizeof(struct rte_flow_item_icmp6_nd_ns)),
+ MK_FLOW_ITEM(ICMP6_ND_NA, sizeof(struct rte_flow_item_icmp6_nd_na)),
+ MK_FLOW_ITEM(ICMP6_ND_OPT_SLA_ETH,
+ sizeof(struct rte_flow_item_icmp6_nd_opt_sla_eth)),
+ MK_FLOW_ITEM(ICMP6_ND_OPT_TLA_ETH,
+ sizeof(struct rte_flow_item_icmp6_nd_opt_tla_eth)),
};
/** Compute storage space needed by item specification. */
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 961943dda..9c9ddcbd2 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -992,6 +992,78 @@ Matches a GENEVE header.
- ``rsvd1``: reserved, normally 0x00.
- Default ``mask`` matches VNI only.
+Item: ``IPV6_EXT``
+^^^^^^^^^^^^^^^^^^
+
+Matches an IPv6 Extension header with any type.
+
+- ``next_hdr``: protocol of next header.
+- Default ``mask`` matches protocal of next header.
+
+Item: ``ICMP6``
+^^^^^^^^^^^^^^^
+
+Matches an ICMPv6 header followed by any message body.
+
+- ``type``: ICMPv6 type.
+- ``code``: ICMPv6 code.
+- ``checksume``: ICMPv6 checksume.
+- Default ``mask`` matches type and code only.
+
+Item: ``ICMP6_ND_NS``
+^^^^^^^^^^^^^^^^^^^^^
+
+Matches an ICMPv6 header followed by network discvoery neighbor solicitation,
+
+- ``type``: ICMPv6 type, normally 135.
+- ``code``: ICMPv6 code, normally 0.
+- ``checksume``: ICMPv6 checksume.
+- ``reserved``: reserved, normally 0x00.
+- ``tgt_addr``: target address of neighbor solicitation.
+- Default ``mask`` matches target address only.
+
+Item: ``ICMP6_ND_NA``
+^^^^^^^^^^^^^^^^^^^^^
+
+Matches an ICMPv6 header followed by network discvoery neighbor advertisement,
+
+- ``type``: ICMPv6 type, normally 136.
+- ``code``: ICMPv6 code, normally 0.
+- ``checksume``: ICMPv6 checksume.
+- ``rso_reserved``: route flag (1b), solicited flag (1b), override flag (1b),
+ reserved (29b).
+- ``tgt_addr``: target address of neighbor advertisement.
+- Default ``mask`` matches target address only.
+
+Item: ``ICMP6_ND_OPT_SLA_ETH``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Matches an ICMPv6 header followed by network discvoery neighbor solicitation
+that contains source Ethernet link-layer address option.
+
+- ``type``: ICMPv6 type, normally 135.
+- ``code``: ICMPv6 code, normally 0.
+- ``checksume``: ICMPv6 checksume.
+- ``reserved``: reserved, normally 0x00.
+- ``tgt_addr``: target address of neighbor solicitation.
+- ``sll_ADDR``: source Ethernet link-layer address.
+- Default ``mask`` matches target address and source link-layer address only.
+
+Item: ``ICMP6_ND_OPT_TLA_ETH``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Matches an ICMPv6 header followed by network discvoery neighbor advertisement.
+that contains target Ethernet link-layer address option.
+
+- ``type``: ICMPv6 type, normally 136.
+- ``code``: ICMPv6 code, normally 0.
+- ``checksume``: ICMPv6 checksume.
+- ``rso_reserved``: route flag (1b), solicited flag (1b), override flag (1b),
+ reserved (29b).
+- ``tgt_addr``: target address of neighbor advertisement.
+- ``tll_ADDR``: target Ethernet link-layer address.
+- Default ``mask`` matches target address and target link-layer address only.
+
Actions
~~~~~~~
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index a766ac795..48688600e 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3305,6 +3305,33 @@ This section lists supported pattern items and their attributes, if any.
- ``vni {unsigned}``: virtual network identifier.
- ``protocol {unsigned}``: protocol type.
+- ``ext``: match IPv6 extend header.
+
+ - ``next {unsigned}``: protocol (next header).
+
+- ``icmp6``: match ICMPv6 header.
+
+ - ``type {unsgined}``: ICMPv6 packet type.
+ - ``code {unsigned}``: ICMPv6 packet code.
+
+- ``ns``: match neighbor solicitation over ICMPv6.
+
+ - ``tgt_addr {ipv6 address}``: target address of neighbor solicitation.
+
+- ``na``: match neighbor advertisement over ICMPv6.
+
+ - ``tgt_addr {ipv6 address}``: target address of neighbor advertisement.
+
+- ``sla``: match source link-layer address over neighbor solicitation.
+
+ - ``tgt_addr {ipv6 address}``: target address of neighbor solicitation.
+ - ``sll_addr {MAC-48}``: source link-layer address over neightbor solicitation.
+
+- ``tla``: match target link-layer address over neighbor advertisement.
+
+ - ``tgt_addr {ipv6 address}``: target address of neighbor advertisement.
+ - ``tll_addr {MAC-48}``: target link-layer address over neightbor advertisement.
+
Actions list
^^^^^^^^^^^^
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 56c733451..2efbfb3c4 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -323,6 +323,61 @@ enum rte_flow_item_type {
* See struct rte_flow_item_geneve.
*/
RTE_FLOW_ITEM_TYPE_GENEVE,
+
+ /**
+ * Matches an IPv4 ARP header.
+ *
+ * See struct rte_flow_item_arp.
+ */
+ RTE_FLOW_ITEM_TYPE_ARP_IPV4,
+
+ /**
+ * Matches an IPv6 Extension header with any type.
+ *
+ * See struct rte_flow_item_ipv6_ext.
+ */
+ RTE_FLOW_ITEM_TYPE_IPV6_EXT,
+
+ /**
+ * Matches an ICMPv6 header followed by any message body.
+ *
+ * See struct rte_flow_item_icmp6.
+ */
+ RTE_FLOW_ITEM_TYPE_ICMP6,
+
+ /**
+ * Matches an ICMPv6 header followed by network discovery
+ * neighbor solicitation.
+ *
+ * See struct rte_flow_item_icmp6_nd_ns.
+ */
+ RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS,
+
+ /**
+ * Matches an ICMPv6 header followed by network discovery
+ * neighbor advertisement.
+ *
+ * See struct rte_flow_item_icmp6_nd_na.
+ */
+ RTE_FLOW_ITEM_TYPE_ICMP6_ND_NA,
+
+ /**
+ * Matches an ICMPv6 header followed by network discovery neighbor
+ * solicitation that contains source Ethernet link-layer address
+ * option.
+ *
+ * See struct rte_flow_item_icmp6_nd_opt_sla_eth.
+ */
+ RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_SLA_ETH,
+
+ /**
+ * Matches an ICMPv6 header followed by network discovery neighbor
+ * advertisement that contains target Ethernet link-layer address
+ * option.
+ *
+ * See struct rte_flow_item_icmp6_nd_opt_tla_eth.
+ */
+ RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_TLA_ETH,
};
/**
@@ -815,6 +870,182 @@ static const struct rte_flow_item_geneve rte_flow_item_geneve_mask = {
#endif
/**
+ * RTE_FLOW_ITEM_TYPE_ARP_IPV4
+ *
+ * Matches an IPv4 ARP header.
+ */
+struct rte_flow_item_arp {
+ struct arp_hdr hdr; /**< ARP header. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ARP_IPV4. */
+#ifndef __cplusplus
+static const struct rte_flow_item_arp rte_flow_item_arp_mask = {
+ .hdr = {
+ .arp_data = {
+ .arp_sha = {
+ .addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ },
+ .arp_sip = RTE_BE32(0xffffffff),
+ .arp_tha = {
+ .addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ },
+ .arp_tip = RTE_BE32(0xffffffff),
+ },
+ },
+};
+#endif
+
+/**
+ * RTE_FLOW_ITEM_TYPE_IPV6_EXT
+ *
+ * Matches an IPv6 extension header with any type.
+ */
+struct rte_flow_item_ipv6_ext {
+ uint8_t next_hdr; /**< protocol of next header */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_IPV6_EXT. */
+#ifndef __cplusplus
+static const
+struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask = {
+ .next_hdr = 0xff,
+};
+#endif
+
+/**
+ * RTE_FLOW_ITEM_TYPE_ICMP6
+ *
+ * Matches an ICMPv6 header followed by any message body.
+ */
+struct rte_flow_item_icmp6 {
+ uint8_t type; /**< ICMPv6 type. */
+ uint8_t code; /**< ICMPv6 code. */
+ uint16_t checksum; /**< ICMPv6 checksum. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP6. */
+#ifndef __cplusplus
+static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask = {
+ .type = 0xff,
+ .code = 0xff,
+};
+#endif
+
+/**
+ * RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS
+ *
+ * Matches an ICMP6 header followed by network discovery
+ * neighbor solicitation.
+ */
+struct rte_flow_item_icmp6_nd_ns {
+ uint8_t type; /**< ICMPv6 type, normally 135. */
+ uint8_t code; /**< ICMPv6 code, normally 0. */
+ rte_be16_t checksum; /**< ICMPv6 checksum. */
+ rte_be32_t reserved;
+ uint8_t target_addr[16]; /**< Target address. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS */
+#ifndef __cplusplus
+static const
+struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask = {
+ .target_addr =
+ "\xff\xff\xff\xff\xff\xff\xff\xff"
+ "\xff\xff\xff\xff\xff\xff\xff\xff",
+};
+#endif
+
+/**
+ * RTE_FLOW_ITEM_TYPE_ICMP6_ND_NA
+ *
+ * Matches an ICMPv6 header followed by network discovery
+ * neighbor advertisement.
+ */
+struct rte_flow_item_icmp6_nd_na {
+ uint8_t type; /**< ICMPv6 type, normally 136. */
+ uint8_t code; /**< ICMPv6 code, normally 0. */
+ rte_be16_t checksum; /**< ICMPv6 checksum. */
+ /**
+ * Route flag (1b), solicited flag (1b), override flag (1b),
+ * reserved (29b).
+ */
+ rte_be32_t rso_reserved;
+ uint8_t target_addr[16]; /**< Target address. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP6_ND_NA. */
+#ifndef __cplusplus
+static const
+struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask = {
+ .target_addr =
+ "\xff\xff\xff\xff\xff\xff\xff\xff"
+ "\xff\xff\xff\xff\xff\xff\xff\xff",
+};
+#endif
+
+/**
+ * RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_SLA_ETH
+ *
+ * Matches an ICMPv6 header followed by network discovery neighbor
+ * solicitation that contains source Ethernet link-layer address option.
+ */
+struct rte_flow_item_icmp6_nd_opt_sla_eth {
+ uint8_t type; /**< ICMPv6 type, normally 135. */
+ uint8_t code; /**< ICMPv6 code, normally 0. */
+ rte_be16_t checksum; /**< ICMPv6 checksum. */
+ rte_be32_t reserved;
+ uint8_t target_addr[16]; /**< Target address. */
+ struct ether_addr sll_addr; /**< Source Ethernet link-layer address. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_SLA_ETH. */
+#ifndef __cplusplus
+static const struct rte_flow_item_icmp6_nd_opt_sla_eth
+ rte_flow_item_icmp6_nd_opt_sla_eth_mask = {
+ .target_addr =
+ "\xff\xff\xff\xff\xff\xff\xff\xff"
+ "\xff\xff\xff\xff\xff\xff\xff\xff",
+ .sll_addr = {
+ .addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ }
+};
+#endif
+
+/**
+ * RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_TLA_ETH
+ *
+ * Matches an ICMPv6 header followed by network discovery neighbor
+ * advertisement that contains target Ethernet link-layer address option.
+ */
+struct rte_flow_item_icmp6_nd_opt_tla_eth {
+ uint8_t type; /**< ICMPv6 type, normally 136. */
+ uint8_t code; /**< ICMPv6 code, normally 0. */
+ rte_be16_t checksum; /**< ICMPv6 checksum. */
+ /**
+ * Route flag (1b), solicited flag (1b), override flag (1b),
+ * reserved (29b).
+ */
+ rte_be32_t rso_reserved;
+ uint8_t target_addr[16]; /**< Target address. */
+ struct ether_addr tll_addr; /**< Target Ethernet link-layer address. */
+
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_TLA_ETH. */
+#ifndef __cplusplus
+static const struct rte_flow_item_icmp6_nd_opt_tla_eth
+ rte_flow_item_icmp6_nd_opt_tla_eth_mask = {
+ .target_addr =
+ "\xff\xff\xff\xff\xff\xff\xff\xff"
+ "\xff\xff\xff\xff\xff\xff\xff\xff",
+ .tll_addr = {
+ .addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ }
+};
+#endif
+
+/**
* Matching pattern item definition.
*
* A pattern is formed by stacking items starting from the lowest protocol
--
2.13.6
next prev parent reply other threads:[~2018-04-16 5:16 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 23:29 [dpdk-dev] [PATCH 0/4] rte_flow extension for vSwitch acceleration Qi Zhang
2018-03-28 23:29 ` [dpdk-dev] [PATCH 1/4] ether: add flow action to redirect packet in a switch domain Qi Zhang
2018-03-29 10:48 ` Pattan, Reshma
2018-03-29 11:20 ` Pattan, Reshma
2018-03-28 23:29 ` [dpdk-dev] [PATCH 2/4] ether: add flow last hit query support Qi Zhang
2018-03-28 23:29 ` [dpdk-dev] [PATCH 3/4] ether: add more protocol support in flow API Qi Zhang
2018-03-29 14:32 ` Pattan, Reshma
2018-03-28 23:29 ` [dpdk-dev] [PATCH 4/4] ether: add packet modification aciton " Qi Zhang
2018-03-29 15:23 ` Pattan, Reshma
2018-04-02 3:35 ` Zhang, Qi Z
2018-04-01 21:19 ` [dpdk-dev] [PATCH v2 0/4] rte_flow extension for vSwitch acceleration Qi Zhang
2018-04-01 21:19 ` [dpdk-dev] [PATCH v2 1/4] ether: add flow action to redirect packet to a port Qi Zhang
2018-04-11 16:30 ` Adrien Mazarguil
2018-04-01 21:19 ` [dpdk-dev] [PATCH v2 2/4] ether: add flow last hit query support Qi Zhang
2018-04-11 16:31 ` Adrien Mazarguil
2018-04-01 21:19 ` [dpdk-dev] [PATCH v2 3/4] ether: add more protocol support in flow API Qi Zhang
2018-04-11 16:32 ` Adrien Mazarguil
2018-04-12 5:12 ` Zhang, Qi Z
2018-04-12 9:19 ` Adrien Mazarguil
2018-04-12 10:00 ` Zhang, Qi Z
2018-04-01 21:19 ` [dpdk-dev] [PATCH v2 4/4] ether: add packet modification aciton " Qi Zhang
2018-04-12 7:03 ` Adrien Mazarguil
2018-04-12 8:50 ` Zhang, Qi Z
2018-04-12 10:22 ` Adrien Mazarguil
2018-04-13 13:47 ` Zhang, Qi Z
2018-04-16 13:30 ` Adrien Mazarguil
2018-04-16 15:03 ` Zhang, Qi Z
2018-04-17 9:55 ` Adrien Mazarguil
2018-04-17 10:32 ` Zhang, Qi Z
2018-04-10 14:12 ` [dpdk-dev] [PATCH v2 0/4] rte_flow extension for vSwitch acceleration Thomas Monjalon
2018-04-16 5:16 ` [dpdk-dev] [PATCH v3 " Qi Zhang
2018-04-16 5:16 ` Qi Zhang [this message]
2018-04-16 5:16 ` [dpdk-dev] [PATCH v3 2/4] ethdev: add packet field set aciton in flow API Qi Zhang
2018-04-16 5:16 ` [dpdk-dev] [PATCH v3 3/4] ethdev: add TTL change actions " Qi Zhang
2018-04-16 5:48 ` Shahaf Shuler
2018-04-16 8:12 ` Adrien Mazarguil
2018-04-16 8:56 ` Shahaf Shuler
2018-04-16 9:59 ` Adrien Mazarguil
2018-04-16 5:16 ` [dpdk-dev] [PATCH v3 4/4] ethdev: add VLAN and MPLS pop push action " Qi Zhang
2018-04-16 6:10 ` [dpdk-dev] [PATCH v3 0/4] rte_flow extension for vSwitch acceleration Qi Zhang
2018-04-16 6:10 ` [dpdk-dev] [PATCH v3 1/4] ethdev: add more protocol support in flow API Qi Zhang
2018-04-19 14:48 ` Adrien Mazarguil
2018-04-16 6:10 ` [dpdk-dev] [PATCH v3 2/4] ethdev: add packet field set aciton " Qi Zhang
2018-04-19 14:48 ` Adrien Mazarguil
2018-04-20 2:24 ` Zhang, Qi Z
2018-04-20 8:54 ` Adrien Mazarguil
2018-04-16 6:10 ` [dpdk-dev] [PATCH v3 3/4] ethdev: add TTL change actions " Qi Zhang
2018-04-19 14:48 ` Adrien Mazarguil
2018-04-16 6:10 ` [dpdk-dev] [PATCH v3 4/4] ethdev: add VLAN and MPLS pop push action " Qi Zhang
2018-04-17 7:34 ` Shahaf Shuler
2018-04-19 14:49 ` Adrien Mazarguil
2018-04-23 6:36 ` [dpdk-dev] [PATCH v4 0/3] rte_flow extension for vSwitch acceleration Qi Zhang
2018-04-23 6:36 ` [dpdk-dev] [PATCH v4 1/3] ethdev: add more protocol support in flow API Qi Zhang
2018-04-23 6:36 ` [dpdk-dev] [PATCH v4 2/3] ethdev: add TTL change actions " Qi Zhang
2018-04-23 6:36 ` [dpdk-dev] [PATCH v4 3/3] ethdev: add VLAN and MPLS " Qi Zhang
2018-04-24 15:58 ` [dpdk-dev] [PATCH v5 0/3] rte_flow extension for vSwitch acceleration Adrien Mazarguil
2018-04-24 15:58 ` [dpdk-dev] [PATCH v5 1/3] ethdev: add neighbor discovery support to flow API Adrien Mazarguil
2018-04-24 15:59 ` [dpdk-dev] [PATCH v5 2/3] ethdev: add TTL change actions " Adrien Mazarguil
2018-04-24 15:59 ` [dpdk-dev] [PATCH v5 3/3] ethdev: add VLAN and MPLS " Adrien Mazarguil
2018-04-25 13:54 ` [dpdk-dev] [PATCH v5 0/3] rte_flow extension for vSwitch acceleration Zhang, Qi Z
2018-04-25 22:44 ` Ferruh Yigit
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=20180416051639.188034-2-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=adrien.mazarguil@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=michael.j.glynn@intel.com \
--cc=sugesh.chandran@intel.com \
--cc=yu.y.liu@intel.com \
/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).