From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 17DA87F0C for ; Thu, 20 Nov 2014 23:48:34 +0100 (CET) Received: by mail-wg0-f45.google.com with SMTP id b13so5052374wgh.32 for ; Thu, 20 Nov 2014 14:59:06 -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=PyCLcIv0roIVOwxNZQrV7A8dbaV82YCy2eU5S3b9MBw=; b=lmnlIx2s2FWUDBpDdc71rnPIXjlehBHfxX7vr/jpFjCO/01jF/xE8R4JDazQ8OOixP NP6Vxo+qyGKZGX9B2fs1f9tALSE2MSLIHzFmZypsBbEBGY4yiL5KMDEo5r1EBjLVLhH4 WkpNTElMqXCptUsLvUSspAUZsNBHzIGayAEzRWK41XRFsRRdVYu3H1PWZlNowrNJlqCL pSf/f4mKrlQeJxh5KC49tXzkoHGguTRz6l8HLbvySgqfh9XOWFHnz1i+fHqNw9WFHEAj GfrUWFTGKPQxO2yIG2EwQSGZ3phC2M99YbrsbklL0WceCVSVFam8wt4WfwMyIYXFxvAB GW+g== X-Gm-Message-State: ALoCoQlcZygbEQxvIwLK2l8dKk4+poM80fonPVp8MneLJZlY/w0zoiikK8zSjxZu5Jbu9UBlXnke X-Received: by 10.194.184.75 with SMTP id es11mr1280842wjc.35.1416524345975; Thu, 20 Nov 2014 14:59:05 -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.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Nov 2014 14:59:05 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Thu, 20 Nov 2014 23:58:45 +0100 Message-Id: <1416524335-22753-4-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 03/13] mbuf: reorder tx ol_flags 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:34 -0000 The tx mbuf flags are now ordered from the lowest value to the the highest. Add comments to explain where to add new flags. By the way, move the PKT_TX_VXLAN_CKSUM at the right place. Signed-off-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f5f8658..d3eba44 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -93,14 +93,11 @@ extern "C" { #define PKT_RX_IEEE1588_TMST (1ULL << 10) /**< RX IEEE1588 L2/L4 timestamped packet.*/ #define PKT_RX_TUNNEL_IPV4_HDR (1ULL << 11) /**< RX tunnel packet with IPv4 header.*/ #define PKT_RX_TUNNEL_IPV6_HDR (1ULL << 12) /**< RX tunnel packet with IPv6 header. */ +/* add new RX flags here */ -#define PKT_TX_VLAN_PKT (1ULL << 55) /**< TX packet is a 802.1q VLAN packet. */ -#define PKT_TX_IP_CKSUM (1ULL << 54) /**< IP cksum of TX pkt. computed by NIC. */ +/* add new TX flags here */ #define PKT_TX_VXLAN_CKSUM (1ULL << 50) /**< TX checksum of VXLAN computed by NIC */ -#define PKT_TX_IPV4_CSUM PKT_TX_IP_CKSUM /**< Alias of PKT_TX_IP_CKSUM. */ -#define PKT_TX_IPV4 PKT_RX_IPV4_HDR /**< IPv4 with no IP checksum offload. */ -#define PKT_TX_IPV6 PKT_RX_IPV6_HDR /**< IPv6 packet */ - +#define PKT_TX_IEEE1588_TMST (1ULL << 51) /**< TX IEEE1588 packet to timestamp. */ /* * Bits 52+53 used for L4 packet type with checksum enabled. * 00: Reserved @@ -114,8 +111,12 @@ extern "C" { #define PKT_TX_UDP_CKSUM (3ULL << 52) /**< UDP cksum of TX pkt. computed by NIC. */ #define PKT_TX_L4_MASK (3ULL << 52) /**< Mask for L4 cksum offload request. */ -/* Bit 51 - IEEE1588*/ -#define PKT_TX_IEEE1588_TMST (1ULL << 51) /**< TX IEEE1588 packet to timestamp. */ +#define PKT_TX_IP_CKSUM (1ULL << 54) /**< IP cksum of TX pkt. computed by NIC. */ +#define PKT_TX_IPV4_CSUM PKT_TX_IP_CKSUM /**< Alias of PKT_TX_IP_CKSUM. */ +#define PKT_TX_IPV4 PKT_RX_IPV4_HDR /**< IPv4 with no IP checksum offload. */ +#define PKT_TX_IPV6 PKT_RX_IPV6_HDR /**< IPv6 packet */ + +#define PKT_TX_VLAN_PKT (1ULL << 55) /**< TX packet is a 802.1q VLAN packet. */ /* Use final bit of flags to indicate a control mbuf */ #define CTRL_MBUF_FLAG (1ULL << 63) /**< Mbuf contains control data */ -- 2.1.0