From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alejandro Lucero Subject: Re: [RFC PATCH 4/5] kni: add support to get gso_size info Date: Wed, 3 May 2017 14:57:42 +0100 Message-ID: References: <1493810472-668-1-git-send-email-hemant.agrawal@nxp.com> <1493810472-668-4-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Ferruh Yigit , dev To: Hemant Agrawal 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) In-Reply-To: <1493810472-668-4-git-send-email-hemant.agrawal@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > >