From patchwork Tue Mar 29 03:04:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingjing Wu X-Patchwork-Id: 11772 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 5240F5585; Tue, 29 Mar 2016 05:04:39 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E514B5398 for ; Tue, 29 Mar 2016 05:04:37 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 28 Mar 2016 20:04:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,409,1455004800"; d="scan'208";a="946913899" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2016 20:04:36 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u2T34Xw7014338; Tue, 29 Mar 2016 11:04:33 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2T34UvQ022701; Tue, 29 Mar 2016 11:04:32 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u2T34Ua6022697; Tue, 29 Mar 2016 11:04:30 +0800 From: Jingjing Wu To: dev@dpdk.org Cc: jingjing.wu@intel.com, yong.liu@intel.com Date: Tue, 29 Mar 2016 11:04:28 +0800 Message-Id: <1459220668-22667-1-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] librte_ether: fix comments for filters X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes comments for tunnel filters and flow director flows. e.g. states fields which are in big endian. Fixes: 7b1312891b69 (ethdev: add IP in GRE tunnel) Fixes: d69be32d4d78 (ethdev: structures to add or delete flow director) Signed-off-by: Jingjing Wu --- lib/librte_ether/rte_eth_ctrl.h | 66 ++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index aabd724..b8c7be9 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -283,19 +283,22 @@ enum rte_tunnel_iptype { * Tunneling Packet filter configuration. */ struct rte_eth_tunnel_filter_conf { - struct ether_addr outer_mac; /**< Outer MAC address filter. */ - struct ether_addr inner_mac; /**< Inner MAC address filter. */ - uint16_t inner_vlan; /**< Inner VLAN filter. */ + struct ether_addr outer_mac; /**< Outer MAC address to match. */ + struct ether_addr inner_mac; /**< Inner MAC address to match. */ + uint16_t inner_vlan; /**< Inner VLAN to match. */ enum rte_tunnel_iptype ip_type; /**< IP address type. */ + /** Outer destination IP address to match if ETH_TUNNEL_FILTER_OIP + is set in filter_type, or inner destination IP address to match + if ETH_TUNNEL_FILTER_IIP is set in filter_type . */ union { - uint32_t ipv4_addr; /**< IPv4 source address to match. */ - uint32_t ipv6_addr[4]; /**< IPv6 source address to match. */ - } ip_addr; /**< IPv4/IPv6 source address to match (union of above). */ - - uint16_t filter_type; /**< Filter type. */ + uint32_t ipv4_addr; /**< IPv4 address in big endian. */ + uint32_t ipv6_addr[4]; /**< IPv6 address in big endian. */ + } ip_addr; + /** Flags from ETH_TUNNEL_FILTER_XX - see above. */ + uint16_t filter_type; enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */ - uint32_t tenant_id; /**< Tenant number. */ - uint16_t queue_id; /**< Queue number. */ + uint32_t tenant_id; /**< Tenant ID to match. VNI, GRE key... */ + uint16_t queue_id; /**< Queue assigned to if match. */ }; /** @@ -403,18 +406,18 @@ struct rte_eth_input_set_conf { * A structure used to define the input for L2 flow */ struct rte_eth_l2_flow { - uint16_t ether_type; /**< Ether type to match */ + uint16_t ether_type; /**< Ether type in big endian */ }; /** * A structure used to define the input for IPV4 flow */ struct rte_eth_ipv4_flow { - uint32_t src_ip; /**< IPv4 source address to match. */ - uint32_t dst_ip; /**< IPv4 destination address to match. */ + uint32_t src_ip; /**< IPv4 source address in big endian. */ + uint32_t dst_ip; /**< IPv4 destination address in big endian. */ uint8_t tos; /**< Type of service to match. */ uint8_t ttl; /**< Time to live to match. */ - uint8_t proto; /**< Protocol, next header to match. */ + uint8_t proto; /**< Protocol, next header in big endian. */ }; /** @@ -422,8 +425,8 @@ struct rte_eth_ipv4_flow { */ struct rte_eth_udpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ - uint16_t src_port; /**< UDP source port to match. */ - uint16_t dst_port; /**< UDP destination port to match. */ + uint16_t src_port; /**< UDP source port in big endian. */ + uint16_t dst_port; /**< UDP destination port in big endian. */ }; /** @@ -431,8 +434,8 @@ struct rte_eth_udpv4_flow { */ struct rte_eth_tcpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ - uint16_t src_port; /**< TCP source port to match. */ - uint16_t dst_port; /**< TCP destination port to match. */ + uint16_t src_port; /**< TCP source port in big endian. */ + uint16_t dst_port; /**< TCP destination port in big endian. */ }; /** @@ -440,17 +443,17 @@ struct rte_eth_tcpv4_flow { */ struct rte_eth_sctpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ - uint16_t src_port; /**< SCTP source port to match. */ - uint16_t dst_port; /**< SCTP destination port to match. */ - uint32_t verify_tag; /**< Verify tag to match */ + uint16_t src_port; /**< SCTP source port in big endian. */ + uint16_t dst_port; /**< SCTP destination port in big endian. */ + uint32_t verify_tag; /**< Verify tag in big endian */ }; /** * A structure used to define the input for IPV6 flow */ struct rte_eth_ipv6_flow { - uint32_t src_ip[4]; /**< IPv6 source address to match. */ - uint32_t dst_ip[4]; /**< IPv6 destination address to match. */ + uint32_t src_ip[4]; /**< IPv6 source address in big endian. */ + uint32_t dst_ip[4]; /**< IPv6 destination address in big endian. */ uint8_t tc; /**< Traffic class to match. */ uint8_t proto; /**< Protocol, next header to match. */ uint8_t hop_limits; /**< Hop limits to match. */ @@ -461,8 +464,8 @@ struct rte_eth_ipv6_flow { */ struct rte_eth_udpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ - uint16_t src_port; /**< UDP source port to match. */ - uint16_t dst_port; /**< UDP destination port to match. */ + uint16_t src_port; /**< UDP source port in big endian. */ + uint16_t dst_port; /**< UDP destination port in big endian. */ }; /** @@ -470,8 +473,8 @@ struct rte_eth_udpv6_flow { */ struct rte_eth_tcpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ - uint16_t src_port; /**< TCP source port to match. */ - uint16_t dst_port; /**< TCP destination port to match. */ + uint16_t src_port; /**< TCP source port to in big endian. */ + uint16_t dst_port; /**< TCP destination port in big endian. */ }; /** @@ -479,9 +482,9 @@ struct rte_eth_tcpv6_flow { */ struct rte_eth_sctpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ - uint16_t src_port; /**< SCTP source port to match. */ - uint16_t dst_port; /**< SCTP destination port to match. */ - uint32_t verify_tag; /**< Verify tag to match */ + uint16_t src_port; /**< SCTP source port in big endian. */ + uint16_t dst_port; /**< SCTP destination port in big endian. */ + uint32_t verify_tag; /**< Verify tag in big endian. */ }; /** @@ -506,7 +509,8 @@ enum rte_eth_fdir_tunnel_type { */ 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... */ + /** Tunnel ID to match. TNI, VNI... in big endian. */ + uint32_t tunnel_id; struct ether_addr mac_addr; /**< Mac address to match. */ };