From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 1464E7F55 for ; Mon, 10 Nov 2014 16:50:08 +0100 (CET) Received: by mail-wg0-f42.google.com with SMTP id k14so9097855wgh.1 for ; Mon, 10 Nov 2014 07:59:53 -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=5xXZn7O6JJmmOTuTA1SFNqPR8epj5vwqm+SLkwcM90A=; b=VF3ff5Axq3L8EQZ2uCdWU7y5Q3bjM7oTOAS3kv6BS7ggBTAZouQnsSxASKozYP0Ze4 kywQ03QEZFK0v0G8BQPt/DCw0LW/OVZwbsvBCGapv56iIc95qY1PKDwOv2o80yBJ4Lez bEJ5lpLbaXYmNM7WNEPVvMGC73TJCpTP7SzmeyxXlEqHusubQ30flR4ymJxMIMxpd3RC +PfYQem9Cdr0AVzXk+qfYsRIaZUxAxyVcqa+08YKVk/R9m6EkVAzar23MmUD1Lfv6TlU QUakBUTTzVgR84mvrjFJ/pVFH6LnCf2BCIqUBNaBENgq1NzenoM84nSAzev5Bz4EWg5U ttJQ== X-Gm-Message-State: ALoCoQmAZRko67AtMJyU03jkwBfm3GZMPiPKx14SjWtrW/8zaxaXMejJTapmgAAFsiJvy5RZP2yG X-Received: by 10.181.13.208 with SMTP id fa16mr31097480wid.61.1415635193819; Mon, 10 Nov 2014 07:59:53 -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 ll2sm10966561wjb.11.2014.11.10.07.59.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Nov 2014 07:59:53 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Mon, 10 Nov 2014 16:59:19 +0100 Message-Id: <1415635166-1364-6-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com> References: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com> Cc: jigsaw@gmail.com Subject: [dpdk-dev] [PATCH 05/12] 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: Mon, 10 Nov 2014 15:50:08 -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 --- lib/librte_mbuf/rte_mbuf.h | 5 ----- lib/librte_pmd_e1000/igb_rxtx.c | 3 ++- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 3 ++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 96e322b..ff11b84 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -129,11 +129,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 321493e..dbf5074 100644 --- a/lib/librte_pmd_e1000/igb_rxtx.c +++ b/lib/librte_pmd_e1000/igb_rxtx.c @@ -400,7 +400,8 @@ 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 & (PKT_TX_VLAN_PKT | PKT_TX_IP_CKSUM | + PKT_TX_L4_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 042ee8a..70ca254 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -580,7 +580,8 @@ 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 & (PKT_TX_VLAN_PKT | PKT_TX_IP_CKSUM | + PKT_TX_L4_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