From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D1A1458CB for ; Thu, 29 Jan 2015 04:16:29 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 28 Jan 2015 19:16:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,484,1418112000"; d="scan'208";a="644273456" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 28 Jan 2015 19:16:27 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0T3GNku027076; Thu, 29 Jan 2015 11:16:23 +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 t0T3GLYh012719; Thu, 29 Jan 2015 11:16:23 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0T3GL73012715; Thu, 29 Jan 2015 11:16:21 +0800 From: Helin Zhang To: dev@dpdk.org Date: Thu, 29 Jan 2015 11:15:54 +0800 Message-Id: <1422501365-12643-7-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1422501365-12643-1-git-send-email-helin.zhang@intel.com> References: <1421637666-16872-1-git-send-email-helin.zhang@intel.com> <1422501365-12643-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH 06/17] bond: support of unified packet type 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: , X-List-Received-Date: Thu, 29 Jan 2015 03:16:30 -0000 To unify packet types among all PMDs, bit masks of packet type for ol_flags are replaced by unified packet type. Signed-off-by: Helin Zhang --- lib/librte_pmd_bond/rte_eth_bond_pmd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c index 8b80297..acd8e77 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c +++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c @@ -319,12 +319,11 @@ xmit_l23_hash(const struct rte_mbuf *buf, uint8_t slave_count) hash = ether_hash(eth_hdr); - if (buf->ol_flags & PKT_RX_IPV4_HDR) { + if (RTE_ETH_IS_IPV4_HDR(buf->packet_type)) { struct ipv4_hdr *ipv4_hdr = (struct ipv4_hdr *) ((char *)(eth_hdr + 1) + vlan_offset); l3hash = ipv4_hash(ipv4_hdr); - - } else if (buf->ol_flags & PKT_RX_IPV6_HDR) { + } else if (RTE_ETH_IS_IPV6_HDR(buf->packet_type)) { struct ipv6_hdr *ipv6_hdr = (struct ipv6_hdr *) ((char *)(eth_hdr + 1) + vlan_offset); l3hash = ipv6_hash(ipv6_hdr); @@ -346,7 +345,7 @@ xmit_l34_hash(const struct rte_mbuf *buf, uint8_t slave_count) struct tcp_hdr *tcp_hdr = NULL; uint32_t hash, l3hash = 0, l4hash = 0; - if (buf->ol_flags & PKT_RX_IPV4_HDR) { + if (RTE_ETH_IS_IPV4_HDR(buf->packet_type)) { struct ipv4_hdr *ipv4_hdr = (struct ipv4_hdr *) ((char *)(eth_hdr + 1) + vlan_offset); size_t ip_hdr_offset; @@ -365,7 +364,7 @@ xmit_l34_hash(const struct rte_mbuf *buf, uint8_t slave_count) ip_hdr_offset); l4hash = HASH_L4_PORTS(udp_hdr); } - } else if (buf->ol_flags & PKT_RX_IPV6_HDR) { + } else if (RTE_ETH_IS_IPV6_HDR(buf->packet_type)) { struct ipv6_hdr *ipv6_hdr = (struct ipv6_hdr *) ((char *)(eth_hdr + 1) + vlan_offset); l3hash = ipv6_hash(ipv6_hdr); -- 1.8.1.4