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 EBEEF68CD for ; Wed, 3 Dec 2014 15:41:32 +0100 (CET) Received: by mail-wg0-f45.google.com with SMTP id b13so20082169wgh.4 for ; Wed, 03 Dec 2014 06:41:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Brxun7ecFdRRTBiUyL0/kiefxVApSFLTG88eAXJgTUg=; b=EA/wE4ncOMtNi7j8jH3eRAQXkAFImsp6d1qKzQUnexfWIrCn9SSL91fOnXD5yvfGmh Zkb49CDNiwh0D6iLVOSrl+XeKtmnq1PEheEmMSrPD5CYQ9UZFP6aKpeCogq97URpn730 zkXdYgcxVBl8DIxdN26DhPuttrFUx7feYHqsrk4sWbkGY7IFVJKShjZ1D6ZIGpeYg8S6 PlFfD4N3D2ypS5sW38xZoGZHT955mJ+nvWkJnS86w6tOen6el4RXMgdTi2yTQjjIDD71 8Z4Hayoxrj7rvHwqMAu4BFNLGjairfJYc5J86b+mAttd0Db0cU1+3edXmRZlOH77tFFf aCiQ== X-Gm-Message-State: ALoCoQkA4HaTGPQ2oYF5gKxXqu7YzTJEoQ7MoTCH7DBVm+ztrGUIvPvgM100Gt7FKSjgbsb5Ka0d X-Received: by 10.194.200.1 with SMTP id jo1mr8301193wjc.64.1417617692406; Wed, 03 Dec 2014 06:41:32 -0800 (PST) Received: from [10.16.0.195] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id rx8sm36546779wjb.30.2014.12.03.06.41.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 06:41:32 -0800 (PST) Message-ID: <547F211B.3040905@6wind.com> Date: Wed, 03 Dec 2014 15:41:31 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: "Ananyev, Konstantin" , "Liu, Jijiang" , "dev@dpdk.org" References: <1417532767-1309-1-git-send-email-jijiang.liu@intel.com> <1417532767-1309-3-git-send-email-jijiang.liu@intel.com> <547EF6E9.5040000@6wind.com> <2601191342CEEE43887BDE71AB977258213BC46D@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258213BC46D@IRSMSX105.ger.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM 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, 03 Dec 2014 14:41:33 -0000 Hi Konstantin, On 12/03/2014 01:59 PM, Ananyev, Konstantin wrote: >> I still think having a flag IPV4 + another flag IP_CHECKSUM is not >> appropriate. > > Sorry, didn't get you here. > Are you talking about our discussion should PKT_TX_IP_CKSUM and PKT_TX_IPV4 be mutually exclusive or not? Yes >> I though Konstantin agreed on other flags, but I may >> have misunderstood: >> >> http://dpdk.org/ml/archives/dev/2014-November/009070.html > > In that mail, I was talking about my suggestion to make PKT_TX_IP_CKSUM, PKT_TX_IPV4 and PKT_TX_IPV6 to occupy 2 bits. > Something like: > #define PKT_TX_IP_CKSUM (1 << X) > #define PKT_TX_IPV6 (2 << X) > #define PKT_TX_IPV4 (3 << X) > > "Even better, if we can squeeze these 3 flags into 2 bits. > Would save us 2 bits, plus might be handy, as in the PMD you can do: > > switch (ol_flags & TX_L3_MASK) { > case TX_IPV4: > ... > break; > case TX_IPV6: > ... > break; > case TX_IP_CKSUM: > ... > break; > }" > > As you pointed out, it will break backward compatibility. > I agreed with that and self-NACKed it. ok, so we are back between: 1/ (Jijiang's patch) PKT_TX_IP_CKSUM /* packet is IPv4, and we want hw cksum */ PKT_TX_IPV6 /* packet is IPv6 */ PKT_TX_IPV4 /* packet is IPv4, and we don't want hw cksum */ with PKT_TX_IP_CKSUM and PKT_TX_IPV4 exclusive and 2/ PKT_TX_IP_CKSUM /* we want hw IP cksum */ PKT_TX_IPV6 /* packet is IPv6 */ PKT_TX_IPV4 /* packet is IPv4 */ with PKT_TX_IP_CKSUM implies PKT_TX_IPV4 Solution 2/ looks better from a user point of view. Anyone else has an opinion? Regards, Olivier