From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id 51DF87F0C for ; Thu, 20 Nov 2014 23:48:36 +0100 (CET) Received: by mail-wi0-f178.google.com with SMTP id hi2so7002875wib.17 for ; Thu, 20 Nov 2014 14:59:08 -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=a5cLiWemz8fhl6MipA8RW4fDAS4VW9JGCm+j03ad3SA=; b=dukQGcQTLW/TGqs899mJGv14klgua7V4HxG0iiGf2E4nlDF20RV+bBVHWCBskUGU3Y 9GeMQELssUDToBcNgVpNvndhEkLuDNR/CVWTSlEaXQm5fBSfVhiINj9wGN+LaaodEY3A MCpkkdaSt80i7m07PakHYCFk/f0Z4bEibvFNewRJ5tLjQmNxMkGYnRkdWxp2KyFovPka kaJfXfeKSxYubrslUCDmSbzlPapSW9Bgb5rxZEhjQBOdJuBkii2uIxDiiISHDaMkDdQY VQlE/OyMjbJlkodCX6jUOaRsH0W6oiJEjw8NJOvUTROz0Jz26y+ZGD/3QvgG03FZmM3h 8GtQ== X-Gm-Message-State: ALoCoQkteMEENC9OEc4ZCAgxRm8movRp04nuHXS+YRIfXfXGpDVjv5d1+3hleZUh8qKKiEHLaUO3 X-Received: by 10.194.119.230 with SMTP id kx6mr1493072wjb.80.1416524348216; Thu, 20 Nov 2014 14:59:08 -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 cz3sm5380581wjb.23.2014.11.20.14.59.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Nov 2014 14:59:07 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Thu, 20 Nov 2014 23:58:47 +0100 Message-Id: <1416524335-22753-6-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1416524335-22753-1-git-send-email-olivier.matz@6wind.com> References: <1415984609-2484-1-git-send-email-olivier.matz@6wind.com> <1416524335-22753-1-git-send-email-olivier.matz@6wind.com> Cc: jigsaw@gmail.com Subject: [dpdk-dev] [PATCH v3 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: Thu, 20 Nov 2014 22:48:36 -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 0c96b00..62d952d 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -124,11 +124,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