From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Qi Zhang <qi.z.zhang@intel.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
Subject: Re: [PATCH v3 1/4] ethdev: add more protocol support in flow API
Date: Thu, 19 Apr 2018 16:48:30 +0200 [thread overview]
Message-ID: <20180419144830.GE4957@6wind.com> (raw)
In-Reply-To: <20180416061042.785-2-qi.z.zhang@intel.com>
On Mon, Apr 16, 2018 at 02:10:39PM +0800, Qi Zhang wrote:
> 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>
Beside a bunch of nits and typos, I think this patch is fine, please see
below.
> ---
> app/test-pmd/cmdline_flow.c | 224 ++++++++++++++++++++++++++
> app/test-pmd/config.c | 9 ++
> doc/guides/prog_guide/rte_flow.rst | 88 +++++++++++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 34 ++++
> lib/librte_ether/rte_flow.h | 235 ++++++++++++++++++++++++++++
> 5 files changed, 590 insertions(+)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 59f3b3b57..7950b1b8d 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -150,6 +150,26 @@ enum index {
> ITEM_GENEVE,
> ITEM_GENEVE_VNI,
> ITEM_GENEVE_PROTO,
> + ITEM_ARP_IPV4,
> + ITEM_ARP_IPV4_SHA,
> + ITEM_ARP_IPV4_SIP,
> + ITEM_ARP_IPV4_THA,
> + ITEM_ARP_IPV4_TIP,
> + 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 +456,13 @@ static const enum index next_item[] = {
> ITEM_GTPC,
> ITEM_GTPU,
> ITEM_GENEVE,
> + ITEM_ARP_IPV4,
> + 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 +613,47 @@ static const enum index item_geneve[] = {
> ZERO,
> };
>
> +static const enum index item_arp_ipv4[] = {
> + ITEM_ARP_IPV4_SHA,
> + ITEM_ARP_IPV4_SIP,
> + ITEM_ARP_IPV4_THA,
> + ITEM_ARP_IPV4_TIP,
> + 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 +1541,162 @@ static const struct token token_list[] = {
> .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve,
> protocol)),
> },
> + [ITEM_ARP_IPV4] = {
> + .name = "arp",
> + .help = "match IPv4 ARP header",
> + .priv = PRIV_ITEM(ARP_IPV4,
> + sizeof(struct rte_flow_item_arp_ipv4)),
> + .next = NEXT(item_arp_ipv4),
> + .call = parse_vc,
> + },
> + [ITEM_ARP_IPV4_SHA] = {
> + .name = "sha",
> + .help = "sender hardware address",
> + .next = NEXT(item_arp_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_ipv4,
> + arp_sha.addr_bytes)),
> + },
> + [ITEM_ARP_IPV4_SIP] = {
> + .name = "sip",
> + .help = "sender IP address",
> + .next = NEXT(item_arp_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_ipv4,
> + arp_sip)),
> + },
> + [ITEM_ARP_IPV4_THA] = {
> + .name = "tha",
> + .help = "target hardware address",
> + .next = NEXT(item_arp_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_ipv4,
> + arp_tha.addr_bytes)),
> + },
> + [ITEM_ARP_IPV4_TIP] = {
> + .name = "tip",
> + .help = "target IP address",
> + .next = NEXT(item_arp_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_ipv4,
> + arp_tip)),
> + },
> + [ITEM_IPV6_EXT] = {
> + .name = "ext",
> + .help = "match IPv6 extend header",
extend => extended
> + .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 ",
Extra space after "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..4a1af5c57 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -980,6 +980,15 @@ 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(ARP_IPV4, sizeof(struct rte_flow_item_arp_ipv4)),
> + 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..99468bf60 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -992,6 +992,94 @@ Matches a GENEVE header.
> - ``rsvd1``: reserved, normally 0x00.
> - Default ``mask`` matches VNI only.
>
> +Item: ``ARP_IPV4``
> +^^^^^^^^^^^^^^^^^^
> +
> +Matches an IPv4 ARP header.
> +
> +- ``arp_hdr``: format of hardware address.
> +- ``arp_pro``: format of protocol address.
> +- ``arp_hln``: length of hardware address.
> +- ``arp_pln``: length of protocol address.
> +- ``arp_op``: ARP opcode.
> +- ``sha``: sender hardware address.
> +- ``sip``: sender IP address.
> +- ``tha``: target hardware address.
> +- ``tip``: target IP address.
> +- Default ``mask`` only matches sha, sip, tha, tip.
> +
> +Item: ``IPV6_EXT``
> +^^^^^^^^^^^^^^^^^^
> +
> +Matches an IPv6 Extension header with any type.
> +
> +- ``next_hdr``: protocol of next header.
> +- Default ``mask`` matches protocal of next header.
protocal => protocol
> +
> +Item: ``ICMP6``
> +^^^^^^^^^^^^^^^
> +
> +Matches an ICMPv6 header followed by any message body.
> +
> +- ``type``: ICMPv6 type.
> +- ``code``: ICMPv6 code.
> +- ``checksume``: ICMPv6 checksume.
checksume => checksum
> +- Default ``mask`` matches type and code only.
> +
> +Item: ``ICMP6_ND_NS``
> +^^^^^^^^^^^^^^^^^^^^^
> +
> +Matches an ICMPv6 header followed by network discvoery neighbor solicitation,
discvoery => discovery
> +
> +- ``type``: ICMPv6 type, normally 135.
> +- ``code``: ICMPv6 code, normally 0.
> +- ``checksume``: ICMPv6 checksume.
checksume => checksum
> +- ``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,
discvoery => discovery
> +
> +- ``type``: ICMPv6 type, normally 136.
> +- ``code``: ICMPv6 code, normally 0.
> +- ``checksume``: ICMPv6 checksume.
checksume => checksum
> +- ``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
discvoery => discovery
> +that contains source Ethernet link-layer address option.
> +
> +- ``type``: ICMPv6 type, normally 135.
> +- ``code``: ICMPv6 code, normally 0.
> +- ``checksume``: ICMPv6 checksume.
checksume => checksum
> +- ``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.
discvoery => discovery
> +that contains target Ethernet link-layer address option.
> +
> +- ``type``: ICMPv6 type, normally 136.
> +- ``code``: ICMPv6 code, normally 0.
> +- ``checksume``: ICMPv6 checksume.
checksume => checksum
> +- ``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..12d78f10b 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -3305,6 +3305,40 @@ This section lists supported pattern items and their attributes, if any.
> - ``vni {unsigned}``: virtual network identifier.
> - ``protocol {unsigned}``: protocol type.
>
> +- ``arp``: match IPv4 arp header.
> +
> + - ``sha``: sender hardware address.
> + - ``sip``: sender IP address.
> + - ``tha``: target hardware address.
> + - ``tip``: target IP address.
> +
> +- ``ext``: match IPv6 extend header.
> +
> + - ``next {unsigned}``: protocol (next header).
> +
> +- ``icmp6``: match ICMPv6 header.
> +
> + - ``type {unsgined}``: ICMPv6 packet type.
unsgined => unsigned
> + - ``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.
neightbor => neighbor
> +
> +- ``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.
neightbor => neighbor
> +
> Actions list
> ^^^^^^^^^^^^
>
> diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
> index 56c733451..f84bbfda5 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_ipv4.
> + */
> + 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,186 @@ 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_ipv4 {
> + rte_be16_t arp_hrd; /**< format of hardware address. */
> + rte_be16_t arp_pro; /**< format of protocol address. */
> + uint8_t arp_hln; /**< length of hardware address. */
> + uint8_t arp_pln; /**< length of protocol address. */
> + rte_be16_t arp_op; /**< ARP opcode */
> + struct ether_addr arp_sha; /**< sender hardware address. */
> + rte_be32_t arp_sip; /**< sender IP address. */
> + struct ether_addr arp_tha; /**< target hardware address. */
> + rte_be32_t arp_tip; /**< target IP address. */
> +};
Missing caps on the first word on each comment (keep the style of the file).
> +
> +/** Default mask for RTE_FLOW_ITEM_TYPE_ARP_IPV4. */
> +#ifndef __cplusplus
> +static const struct rte_flow_item_arp_ipv4 rte_flow_item_arp_ipv4_mask = {
> + .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 */
> +};
Ditto.
> +
> +/** 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 */
Missing "."
> +#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
>
--
Adrien Mazarguil
6WIND
next prev parent reply other threads:[~2018-04-19 14:48 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 23:29 [PATCH 0/4] rte_flow extension for vSwitch acceleration Qi Zhang
2018-03-28 23:29 ` [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 ` [PATCH 2/4] ether: add flow last hit query support Qi Zhang
2018-03-28 23:29 ` [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 ` [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 ` [PATCH v2 0/4] rte_flow extension for vSwitch acceleration Qi Zhang
2018-04-01 21:19 ` [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 ` [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 ` [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 ` [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 ` [PATCH v2 0/4] rte_flow extension for vSwitch acceleration Thomas Monjalon
2018-04-16 5:16 ` [PATCH v3 " Qi Zhang
2018-04-16 5:16 ` [PATCH v3 1/4] ethdev: add more protocol support in flow API Qi Zhang
2018-04-16 5:16 ` [PATCH v3 2/4] ethdev: add packet field set aciton " Qi Zhang
2018-04-16 5:16 ` [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 ` [PATCH v3 4/4] ethdev: add VLAN and MPLS pop push action " Qi Zhang
2018-04-16 6:10 ` [PATCH v3 0/4] rte_flow extension for vSwitch acceleration Qi Zhang
2018-04-16 6:10 ` [PATCH v3 1/4] ethdev: add more protocol support in flow API Qi Zhang
2018-04-19 14:48 ` Adrien Mazarguil [this message]
2018-04-16 6:10 ` [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 ` [PATCH v3 3/4] ethdev: add TTL change actions " Qi Zhang
2018-04-19 14:48 ` Adrien Mazarguil
2018-04-16 6:10 ` [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 ` [PATCH v4 0/3] rte_flow extension for vSwitch acceleration Qi Zhang
2018-04-23 6:36 ` [PATCH v4 1/3] ethdev: add more protocol support in flow API Qi Zhang
2018-04-23 6:36 ` [PATCH v4 2/3] ethdev: add TTL change actions " Qi Zhang
2018-04-23 6:36 ` [PATCH v4 3/3] ethdev: add VLAN and MPLS " Qi Zhang
2018-04-24 15:58 ` [PATCH v5 0/3] rte_flow extension for vSwitch acceleration Adrien Mazarguil
2018-04-24 15:58 ` [PATCH v5 1/3] ethdev: add neighbor discovery support to flow API Adrien Mazarguil
2018-04-24 15:59 ` [PATCH v5 2/3] ethdev: add TTL change actions " Adrien Mazarguil
2018-04-24 15:59 ` [PATCH v5 3/3] ethdev: add VLAN and MPLS " Adrien Mazarguil
2018-04-25 13:54 ` [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=20180419144830.GE4957@6wind.com \
--to=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=qi.z.zhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.