From: Bruce Richardson <bruce.richardson@intel.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 1/7] lib/librte_ether: modify the structures for fdir new modes
Date: Thu, 22 Oct 2015 13:57:18 +0100 [thread overview]
Message-ID: <20151022125718.GB20740@bricha3-MOBL3> (raw)
In-Reply-To: <1445497902-16703-2-git-send-email-wenzhuo.lu@intel.com>
On Thu, Oct 22, 2015 at 03:11:36PM +0800, Wenzhuo Lu wrote:
> Define the new modes and modify the filter and mask structures for
> the mac vlan and tunnel modes.
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Hi Wenzhuo,
couple of stylistic comments below, which would help with patch review, especially
with regards to checking for ABI issues.
/Bruce
> ---
> lib/librte_ether/rte_eth_ctrl.h | 69 ++++++++++++++++++++++++++++++-----------
> 1 file changed, 51 insertions(+), 18 deletions(-)
>
> diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
> index 26b7b33..078faf9 100644
> --- a/lib/librte_ether/rte_eth_ctrl.h
> +++ b/lib/librte_ether/rte_eth_ctrl.h
> @@ -248,6 +248,17 @@ enum rte_eth_tunnel_type {
> };
>
> /**
> + * Flow Director setting modes: none, signature or perfect.
> + */
> +enum rte_fdir_mode {
> + RTE_FDIR_MODE_NONE = 0, /**< Disable FDIR support. */
> + RTE_FDIR_MODE_SIGNATURE, /**< Enable FDIR signature filter mode. */
> + RTE_FDIR_MODE_PERFECT, /**< Enable FDIR perfect filter mode for IP. */
> + RTE_FDIR_MODE_PERFECT_MAC_VLAN, /**< Enable FDIR filter mode - MAC VLAN. */
> + RTE_FDIR_MODE_PERFECT_TUNNEL, /**< Enable FDIR filter mode - tunnel. */
> +};
> +
Why is this structure definition moved in the file, it makes seeing the
diff vs the old version difficult.
> +/**
> * filter type of tunneling packet
> */
> #define ETH_TUNNEL_FILTER_OMAC 0x01 /**< filter by outer MAC addr */
> @@ -377,18 +388,46 @@ struct rte_eth_sctpv6_flow {
> };
>
> /**
> + * A structure used to define the input for MAC VLAN flow
> + */
> +struct rte_eth_mac_vlan_flow {
> + struct ether_addr mac_addr; /**< Mac address to match. */
> +};
> +
> +/**
> + * Tunnel type for flow director.
> + */
> +enum rte_eth_fdir_tunnel_type {
> + RTE_FDIR_TUNNEL_TYPE_NVGRE = 0,
> + RTE_FDIR_TUNNEL_TYPE_VXLAN,
> + RTE_FDIR_TUNNEL_TYPE_UNKNOWN,
> +};
> +
> +/**
> + * A structure used to define the input for tunnel flow, now it's VxLAN or
> + * NVGRE
> + */
> +struct rte_eth_tunnel_flow {
> + enum rte_eth_fdir_tunnel_type tunnel_type; /**< Tunnel type to match. */
> + uint32_t tunnel_id; /**< Tunnel ID to match. TNI, VNI... */
> + struct ether_addr mac_addr; /**< Mac address to match. */
> +};
> +
> +/**
> * An union contains the inputs for all types of flow
> */
> union rte_eth_fdir_flow {
> - struct rte_eth_l2_flow l2_flow;
> - struct rte_eth_udpv4_flow udp4_flow;
> - struct rte_eth_tcpv4_flow tcp4_flow;
> - struct rte_eth_sctpv4_flow sctp4_flow;
> - struct rte_eth_ipv4_flow ip4_flow;
> - struct rte_eth_udpv6_flow udp6_flow;
> - struct rte_eth_tcpv6_flow tcp6_flow;
> - struct rte_eth_sctpv6_flow sctp6_flow;
> - struct rte_eth_ipv6_flow ipv6_flow;
> + struct rte_eth_l2_flow l2_flow;
> + struct rte_eth_udpv4_flow udp4_flow;
> + struct rte_eth_tcpv4_flow tcp4_flow;
> + struct rte_eth_sctpv4_flow sctp4_flow;
> + struct rte_eth_ipv4_flow ip4_flow;
> + struct rte_eth_udpv6_flow udp6_flow;
> + struct rte_eth_tcpv6_flow tcp6_flow;
> + struct rte_eth_sctpv6_flow sctp6_flow;
> + struct rte_eth_ipv6_flow ipv6_flow;
> + struct rte_eth_mac_vlan_flow mac_vlan_flow;
> + struct rte_eth_tunnel_flow tunnel_flow;
Can you please minimize the whitespace changes here. It looks in the diff
like you are replacing the entire set of entries, but on closer inspection
it looks like you are just adding in two extra lines.
> };
>
> /**
> @@ -465,6 +504,9 @@ struct rte_eth_fdir_masks {
> struct rte_eth_ipv6_flow ipv6_mask;
> uint16_t src_port_mask;
> uint16_t dst_port_mask;
> + uint8_t mac_addr_byte_mask; /** Per byte MAC address mask */
> + uint32_t tunnel_id_mask; /** tunnel ID mask */
> + uint8_t tunnel_type_mask;
> };
>
> /**
> @@ -515,15 +557,6 @@ struct rte_eth_fdir_flex_conf {
> /**< Flex mask configuration for each flow type */
> };
>
> -/**
> - * Flow Director setting modes: none, signature or perfect.
> - */
> -enum rte_fdir_mode {
> - RTE_FDIR_MODE_NONE = 0, /**< Disable FDIR support. */
> - RTE_FDIR_MODE_SIGNATURE, /**< Enable FDIR signature filter mode. */
> - RTE_FDIR_MODE_PERFECT, /**< Enable FDIR perfect filter mode. */
> -};
> -
> #define UINT32_BIT (CHAR_BIT * sizeof(uint32_t))
> #define RTE_FLOW_MASK_ARRAY_SIZE \
> (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT32_BIT)/UINT32_BIT)
> --
> 1.9.3
>
next prev parent reply other threads:[~2015-10-22 12:57 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 6:05 [dpdk-dev] [PATCH 0/6] Support new flow director modes on Intel x550 NIC Wenzhuo Lu
2015-09-25 6:05 ` [dpdk-dev] [PATCH 1/6] lib/librte_ether: modify the structures for fdir new modes Wenzhuo Lu
2015-09-25 7:00 ` Thomas Monjalon
2015-09-25 8:14 ` Lu, Wenzhuo
2015-09-25 8:29 ` Thomas Monjalon
2015-09-28 1:00 ` Lu, Wenzhuo
2015-09-25 6:05 ` [dpdk-dev] [PATCH 2/6] app/testpmd: initialize the new fields for fdir mask Wenzhuo Lu
2015-09-25 6:05 ` [dpdk-dev] [PATCH 3/6] app/testpmd: new fdir modes for testpmd parameter Wenzhuo Lu
2015-09-25 6:05 ` [dpdk-dev] [PATCH 4/6] app/testpmd: modify the output of CLI, show port fdir Wenzhuo Lu
2015-09-25 6:05 ` [dpdk-dev] [PATCH 5/6] app/testpmd: modify and add fdir filter and mask CLIs for new modes Wenzhuo Lu
2015-09-25 6:05 ` [dpdk-dev] [PATCH 6/6] ixgbe: implementation for fdir new modes' config Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 0/6] Support new flow director modes on Intel x550 NIC Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 1/6] lib/librte_ether: modify the structures for fdir new modes Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 2/6] app/testpmd: initialize the new fields for fdir mask Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 3/6] app/testpmd: new fdir modes for testpmd parameter Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 4/6] app/testpmd: modify the output of the CLI show port fdir Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 5/6] app/testpmd: modify and add fdir filter and mask CLIs for new modes Wenzhuo Lu
2015-09-29 5:31 ` [dpdk-dev] [PATCH v2 6/6] ixgbe: implementation for fdir new modes' config Wenzhuo Lu
2015-10-20 13:55 ` Ananyev, Konstantin
2015-10-21 1:48 ` Lu, Wenzhuo
2015-10-21 10:19 ` Ananyev, Konstantin
2015-10-22 1:23 ` Lu, Wenzhuo
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 0/7] Support new flow director modes on Intel x550 NIC Wenzhuo Lu
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 1/7] lib/librte_ether: modify the structures for fdir new modes Wenzhuo Lu
2015-10-22 12:57 ` Bruce Richardson [this message]
2015-10-23 1:22 ` Lu, Wenzhuo
2015-10-23 7:29 ` Thomas Monjalon
2015-10-23 8:08 ` Lu, Wenzhuo
2015-10-23 9:58 ` Bruce Richardson
2015-10-23 13:06 ` Lu, Wenzhuo
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 2/7] app/testpmd: initialize the new fields for fdir mask Wenzhuo Lu
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 3/7] app/testpmd: new fdir modes for testpmd parameter Wenzhuo Lu
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 4/7] app/testpmd: modify the output of the CLI show port fdir Wenzhuo Lu
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 5/7] app/testpmd: modify and add fdir filter and mask CLIs for new modes Wenzhuo Lu
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 6/7] ixgbe: implementation for fdir new modes' config Wenzhuo Lu
2015-10-22 7:11 ` [dpdk-dev] [PATCH v3 7/7] doc: release notes update for flow director enhancement Wenzhuo Lu
2015-10-22 8:36 ` [dpdk-dev] [PATCH v3 0/7] Support new flow director modes on Intel x550 NIC Ananyev, Konstantin
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 " Wenzhuo Lu
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 1/7] lib/librte_ether: modify the structures for fdir new modes Wenzhuo Lu
2015-10-23 10:39 ` Chilikin, Andrey
2015-10-23 10:53 ` Ananyev, Konstantin
2015-10-23 12:55 ` Lu, Wenzhuo
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 2/7] app/testpmd: initialize the new fields for fdir mask Wenzhuo Lu
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 3/7] app/testpmd: new fdir modes for testpmd parameter Wenzhuo Lu
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 4/7] app/testpmd: modify the output of the CLI show port fdir Wenzhuo Lu
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 5/7] app/testpmd: modify and add fdir filter and mask CLIs for new modes Wenzhuo Lu
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 6/7] ixgbe: implementation for fdir new modes' config Wenzhuo Lu
2015-10-23 2:18 ` [dpdk-dev] [PATCH v4 7/7] doc: release notes update for flow director enhancement Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 0/7] Support new flow director modes on Intel x550 NIC Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 1/7] lib/librte_ether: modify the structures for fdir new modes Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 2/7] app/testpmd: initialize the new fields for fdir mask Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 3/7] app/testpmd: new fdir modes for testpmd parameter Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 4/7] app/testpmd: modify the output of the CLI show port fdir Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 5/7] app/testpmd: modify and add fdir filter and mask CLIs for new modes Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 6/7] ixgbe: implementation for fdir new modes' config Wenzhuo Lu
2015-10-26 5:27 ` [dpdk-dev] [PATCH v5 7/7] doc: release notes update for flow director enhancement Wenzhuo Lu
2015-10-27 11:24 ` [dpdk-dev] [PATCH v5 0/7] Support new flow director modes on Intel x550 NIC Ananyev, Konstantin
2015-10-28 23:08 ` Thomas Monjalon
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=20151022125718.GB20740@bricha3-MOBL3 \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=wenzhuo.lu@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).