From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E8F1D2C27 for ; Fri, 5 May 2017 13:43:05 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 05 May 2017 04:43:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,292,1491289200"; d="scan'208";a="83977063" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.81]) ([10.237.220.81]) by orsmga004.jf.intel.com with ESMTP; 05 May 2017 04:43:02 -0700 To: Hemant Agrawal Cc: dev@dpdk.org, Olivier MATZ References: <1493810472-668-1-git-send-email-hemant.agrawal@nxp.com> <1493810472-668-4-git-send-email-hemant.agrawal@nxp.com> From: Ferruh Yigit Message-ID: <0edddcf7-cffb-4f2e-7b9f-681e64cfca38@intel.com> Date: Fri, 5 May 2017 12:43:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <1493810472-668-4-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Fri, 05 May 2017 11:43:06 -0000 On 5/3/2017 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]; rte_kni_mbuf and rte_mbuf should be binary compatible. This is packet_type field of the mbuf struct. When DPDK application receives the mbuf, how it will know if this gso_size or packet_type, unless it knows underlying port is KNI. Is it possible to use udata64 field for this? Who will use information and how it will be used, can you please provide some sort of sample? Thanks, ferruh > 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); >