From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FB4645716; Thu, 1 Aug 2024 20:58:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BF7A4067E; Thu, 1 Aug 2024 20:58:41 +0200 (CEST) Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) by mails.dpdk.org (Postfix) with ESMTP id 71B1240668; Thu, 1 Aug 2024 20:58:40 +0200 (CEST) Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-68518bc1407so27730267b3.2; Thu, 01 Aug 2024 11:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722538720; x=1723143520; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=v65fp250gezuvYis1MJKLXs0lkbBsJVbbdiNT7UPWCk=; b=QfyTDqNAHL5FQTA+DMvUqvoLCDN5JJcjwlMeR6LrHrkhPxM+KQroQgeoQXzLC/+KFm rP4nVnRRkY7Su6aHkATTE+3gxLzvYJcrg/42FgyrCa4doRZvF4QOMClXxYny2YOe4kG4 qS549OD265dFkKJrJjfVGq9bnF4t++7QBU5OTlEC8Smz9XE423pul/VRLUXHj7MLNpuv xSbUelgJJ+dEuFv5X39yR5uwOK0lzOSFOHhaPVOKIQPoITATJIYev9P4NdFHf/cGXgOF o4GrXIj+FgihJbmP5EAmdS6705gk7UL0So4tXjbI/7BHqM9xRx+Wmtm5LwJfOTaNLxc1 feSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722538720; x=1723143520; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v65fp250gezuvYis1MJKLXs0lkbBsJVbbdiNT7UPWCk=; b=VL5zi6FdFrHuMm7BvODL980pay0XLkgpiAu0ICYHEyXNaPXqznVE2AzpeuSE3h6wkt ZC6KzJ+fVSmiIRHX/e6mMwO3CE+sofPVgL0hx/I17xIvhJNEjQiHOHysxepbhivj1cbz laEfexX6CJl1mXtDiifaQpWDjZ0EOhFAmlXQwtTprU5SqfTOu4F7NbbXfhLhFRazcRbj rQOgMyBc1wZPhu56ZBObBr9eA85IB/+/DGRspFGj4sf0DEVLaT9VblMOPP3xdqvwet+a NExzc6Xu4tjCdrVZ9tC6wqQm7PB4HWYYRBcANaLOTmJTEEWhdi3vYcekN/Hrf2pcWwr0 HJtg== X-Forwarded-Encrypted: i=1; AJvYcCUHRbYc25Fi44KTJXF0/o5NBiUzDn+Opti65ZkCm+Knr0EaNnYEiKEhCWUxKYivMzKdcpwt6weKbEigo+zMYelibyTWFgJIDbLBbm00qg== X-Gm-Message-State: AOJu0Yy5G7+VUK4g4StoTYwGj3Adfl/McgmbZTO9AsJV5roGBZqRN/Eb uZwUD07yj5VD5hLx6gWfpi/nxjuVzG7Jk1HoRByzU8gNiLInIkW9/6wi1tDLkqYsZrJ1mg590pP AUl2hPXWKv9lIBmbeF4F/JPwCAcs= X-Google-Smtp-Source: AGHT+IE5CcrJZ+PDRQxAEHJ2pZdH+atkOoj+JBGT3tZHDi7O21aR7i4NfztGMLGJ3sQB3EeZ5k0HrdkG5kdQbK1npFU= X-Received: by 2002:a0d:fd03:0:b0:650:9d94:799f with SMTP id 00721157ae682-68961037c71mr11909527b3.26.1722538719787; Thu, 01 Aug 2024 11:58:39 -0700 (PDT) MIME-Version: 1.0 References: <1722443901-2400194-1-git-send-email-tathagat.dpdk@gmail.com> <1722533273-2405457-1-git-send-email-tathagat.dpdk@gmail.com> <20240801115449.407d1d7f@hermes.local> In-Reply-To: <20240801115449.407d1d7f@hermes.local> From: Tathagat Priyadarshi Date: Fri, 2 Aug 2024 00:28:28 +0530 Message-ID: Subject: Re: [PATCH v3] net/gve : Update EOP & csum bit in txd rte_mbuf chain To: stephen@networkplumber.org Cc: Varun Lakkur Ambaji Rao , dev@dpdk.org, stable@dpdk.org Content-Type: multipart/alternative; boundary="0000000000008143af061ea3cc10" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --0000000000008143af061ea3cc10 Content-Type: text/plain; charset="UTF-8" Thanks for your suggestion Stephen, I have already updated the patch with v4 & fixed the typo. Will consider your suggestion in the next version of the patch. On Fri, 2 Aug 2024 at 00:24, Stephen Hemminger wrote: > On Thu, 1 Aug 2024 17:27:53 +0000 > Tathagat Priyadarshi wrote: > > > + if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO) > > + csum = 1; > > + else > > + cusm = 0; > > + > > Obvious typo, did you do a final test build? > > Could also use logical inverse operator instead of if() which will > generate better code sometimes. > > csum = !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO); > > --0000000000008143af061ea3cc10 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for your suggestion Stephen, I have already update= d the patch with v4 & fixed the typo. Will consider your suggestion in = the next version of the patch.


On Fri, 2 Au= g 2024 at 00:24, Stephen Hemminger <stephen@networkplumber.org> wrote:
On Thu,=C2=A0 1 Aug 2024 17:27:53 +0000
Tathagat Priyadarshi <tathagat.dpdk@gmail.com> wrote:

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ol_flags & GV= E_TX_CKSUM_OFFLOAD_MASK_DQO)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0csum =3D 1;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0cusm =3D 0;
> +

Obvious typo, did you do a final test build?

Could also use logical inverse operator instead of if() which will
generate better code sometimes.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 csum =3D !!(ol_flag= s & GVE_TX_CKSUM_OFFLOAD_MASK_DQO);

--0000000000008143af061ea3cc10--