From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by dpdk.org (Postfix) with ESMTP id 5826237A2 for ; Wed, 3 May 2017 15:57:43 +0200 (CEST) Received: by mail-vk0-f54.google.com with SMTP id q78so90137866vke.3 for ; Wed, 03 May 2017 06:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dbY59lgADVdKoWQDakxQCSbUOviB8GlhoV0I00L1qTo=; b=oItTJ9Zs7ERiSB0lC558yY6iyJZhSkaWlIlwjZ0MEoDBEbkQ6WhgKvVIhLA0/+XY1S seAFhLPlEgmiisBPyTQs9hFaeBQhrOMwtCyh1x6GVvUxsPuyZBI3m81Yuf9mXe/VwAfv rYKAdj/nrOL3GvYqGwx/SpntNdpe3vKVjQhxnzchpGt+nW65gUBqmDndM2zlVNSZI4AD oVL1qM4qx0MKS0FEswaS6nuTtwingsEm0ueNFvCDpLHTuun079M2sCW8VoIqk+/HZ0Wz XEVJRD+Ih7CMkyYPW3isAuPZ70mHxP/pCDSlwJOu8VIzYPfHXqw69PiAGBHy3Z3rrPGO OdXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dbY59lgADVdKoWQDakxQCSbUOviB8GlhoV0I00L1qTo=; b=sOWkCzrRgN1XdNrTirHfhDiB8kFtSmiVEYxVn8UfX/NbAr7L8/z7TZnKh2pgTYwpYu tvFxuRw4FMKhVxp83O9J9NI2KO75jM+E4SQG7XU4LI2uvUv2sv+CFgGfrEVmSKps1Cgb frANkQzJt6484AW6ojMy5mUw4GqDuo1f5SyUwg9yExbBfqo2HDdP2EuLuR5n1/w7ZXeG EHwuyv0jtRWqo7AJaAxmWHgaGMGQOvCRpO3triy9Y6fl9HjQY5Wo/VNkZNn2eNzY89p/ Rdlc2ZA6+5XVST/L0JzQymeE1iglxC/wqjSz9+QtXGbjOvcZduIELZucdw0Z/bxS/NHs vz4Q== X-Gm-Message-State: AN3rC/7DkJ1f/lV7Qs4iYP9p7Ji9mp/eX5ojTA+p8upl7xmkBG4MxQWu Olg22sOlHP82E0loJwUYg9zZ8XumKaUi X-Received: by 10.31.177.131 with SMTP id a125mr15399945vkf.80.1493819862708; Wed, 03 May 2017 06:57:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.14.69 with HTTP; Wed, 3 May 2017 06:57:42 -0700 (PDT) In-Reply-To: <1493810472-668-4-git-send-email-hemant.agrawal@nxp.com> References: <1493810472-668-1-git-send-email-hemant.agrawal@nxp.com> <1493810472-668-4-git-send-email-hemant.agrawal@nxp.com> From: Alejandro Lucero Date: Wed, 3 May 2017 14:57:42 +0100 Message-ID: To: Hemant Agrawal Cc: Ferruh Yigit , dev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC PATCH 4/5] kni: add support to get gso_size info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 May 2017 13:57:43 -0000 I guess this is just need this for tso offload. isn't it? Just asking because I have done some work adding gather and tso offload to kni and I was wondering if this is duplicated job from my part. If you are wondering what KNI offload means, since it is not talking to any hw, the offload is regarding the PMD where KNI is sending packet to. So if that PMD supports hw offloads, KNI netdev can advertise that to the linux network stack. On Wed, May 3, 2017 at 12:21 PM, Hemant Agrawal wrote: > Inform userspace about gso size info > > Signed-off-by: Hemant Agrawal > --- > lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h | 3 ++- > lib/librte_eal/linuxapp/kni/kni_net.c | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h > b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h > index 2cd7d9a..91ebed3 100644 > --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h > +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h > @@ -125,7 +125,8 @@ struct rte_kni_mbuf { > uint16_t nb_segs; /**< Number of segments. */ > char pad4[2]; > uint64_t ol_flags; /**< Offload features. */ > - char pad2[4]; > + uint16_t gso_size; /**< TCP Segmentation Offload Information. > */ > + char pad2[2]; > uint32_t pkt_len; /**< Total pkt len: sum of all segment > data_len. */ > uint16_t data_len; /**< Amount of data in segment buffer. */ > > diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c > b/lib/librte_eal/linuxapp/kni/kni_net.c > index e4a3296..c7648d3 100644 > --- a/lib/librte_eal/linuxapp/kni/kni_net.c > +++ b/lib/librte_eal/linuxapp/kni/kni_net.c > @@ -252,6 +252,7 @@ > } > pkt_kva->pkt_len = len; > pkt_kva->data_len = len; > + pkt_kva->gso_size = skb_shinfo(skb)->gso_size; /* passes > gso_size from Kernel to GPP */ > > /* enqueue mbuf into tx_q */ > ret = kni_fifo_put(kni->tx_q, &pkt_va, 1); > -- > 1.9.1 > >