From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id D1C58590F for ; Wed, 26 Nov 2014 15:54:19 +0100 (CET) Received: by mail-wg0-f51.google.com with SMTP id k14so3924615wgh.38 for ; Wed, 26 Nov 2014 07:05:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bt8qAE9WL5FivchwXM8UcLwdUp/0Vphlklre5SeZAb4=; b=L4Q/8ep5GXJktgxQLh7fbtGp5afkbnZrlwAWlT0yQWq2eVlM3/GOEZdSBeIyzgoRva f6lBT+qolxKI+2X+cyoj4Dgki/qe7axj7QuXn+5uEw2EF8njiEZk0ExvdyeXBglQSSPn 4pFmtSLVq5FBHhOJxFpbz7M8Jn9pTqbvUEaryC3TbkA8YdM3t1vUTVpZwLyHTbIlbSBH JRq0Z2GZRgw5AZdStlclDaqLdFKR9a9Qzvr5khopWLschPIHQyIvfPuGHmxNO6jFmqc0 AQtjujVXNhFIWZ8jwNDw2t+Q6KOvWvzM+ivROoIeHoUIrgVyQsSBR2CMlTpuudSc587D bjUQ== X-Gm-Message-State: ALoCoQlVqUrpSSBbadw+4/XzKqldzkeXQ7V+7Jg5YXVT78OjBFsxuPiBobQ9ILo2VHoSsMGaoYrH X-Received: by 10.180.109.45 with SMTP id hp13mr41901940wib.4.1417014317039; Wed, 26 Nov 2014 07:05:17 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id bm1sm6682819wjb.45.2014.11.26.07.05.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Nov 2014 07:05:16 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Wed, 26 Nov 2014 16:04:47 +0100 Message-Id: <1417014295-29064-6-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1417014295-29064-1-git-send-email-olivier.matz@6wind.com> References: <1416524335-22753-1-git-send-email-olivier.matz@6wind.com> <1417014295-29064-1-git-send-email-olivier.matz@6wind.com> Cc: jigsaw@gmail.com Subject: [dpdk-dev] [PATCH v4 05/13] mbuf: remove too specific PKT_TX_OFFLOAD_MASK definition 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: Wed, 26 Nov 2014 14:54:20 -0000 This definition is specific to Intel PMD drivers and its definition "indicate what bits required for building TX context" shows that it should not be in the generic rte_mbuf.h but in the PMD driver. Signed-off-by: Olivier Matz Acked-by: Bruce Richardson --- lib/librte_mbuf/rte_mbuf.h | 5 ----- lib/librte_pmd_e1000/igb_rxtx.c | 8 +++++++- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 8 +++++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 6d9ef21..c2f4685 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -131,11 +131,6 @@ extern "C" { /* Use final bit of flags to indicate a control mbuf */ #define CTRL_MBUF_FLAG (1ULL << 63) /**< Mbuf contains control data */ -/** - * Bit Mask to indicate what bits required for building TX context - */ -#define PKT_TX_OFFLOAD_MASK (PKT_TX_VLAN_PKT | PKT_TX_IP_CKSUM | PKT_TX_L4_MASK) - /* define a set of marker types that can be used to refer to set points in the * mbuf */ typedef void *MARKER[0]; /**< generic marker for a point in a structure */ diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c index b406397..433c616 100644 --- a/lib/librte_pmd_e1000/igb_rxtx.c +++ b/lib/librte_pmd_e1000/igb_rxtx.c @@ -84,6 +84,12 @@ ETH_RSS_IPV6_UDP | \ ETH_RSS_IPV6_UDP_EX) +/* Bit Mask to indicate what bits required for building TX context */ +#define IGB_TX_OFFLOAD_MASK ( \ + PKT_TX_VLAN_PKT | \ + PKT_TX_IP_CKSUM | \ + PKT_TX_L4_MASK) + static inline struct rte_mbuf * rte_rxmbuf_alloc(struct rte_mempool *mp) { @@ -400,7 +406,7 @@ eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, ol_flags = tx_pkt->ol_flags; vlan_macip_lens.f.vlan_tci = tx_pkt->vlan_tci; vlan_macip_lens.f.l2_l3_len = tx_pkt->l2_l3_len; - tx_ol_req = ol_flags & PKT_TX_OFFLOAD_MASK; + tx_ol_req = ol_flags & IGB_TX_OFFLOAD_MASK; /* If a Context Descriptor need be built . */ if (tx_ol_req) { diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index 7e470ce..ca35db2 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -90,6 +90,12 @@ ETH_RSS_IPV6_UDP | \ ETH_RSS_IPV6_UDP_EX) +/* Bit Mask to indicate what bits required for building TX context */ +#define IXGBE_TX_OFFLOAD_MASK ( \ + PKT_TX_VLAN_PKT | \ + PKT_TX_IP_CKSUM | \ + PKT_TX_L4_MASK) + static inline struct rte_mbuf * rte_rxmbuf_alloc(struct rte_mempool *mp) { @@ -580,7 +586,7 @@ ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, ol_flags = tx_pkt->ol_flags; /* If hardware offload required */ - tx_ol_req = ol_flags & PKT_TX_OFFLOAD_MASK; + tx_ol_req = ol_flags & IXGBE_TX_OFFLOAD_MASK; if (tx_ol_req) { vlan_macip_lens.f.vlan_tci = tx_pkt->vlan_tci; vlan_macip_lens.f.l2_l3_len = tx_pkt->l2_l3_len; -- 2.1.0