From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH 00/17] unified packet type Date: Tue, 03 Feb 2015 09:55:04 +0100 Message-ID: <54D08CE8.6030902@6wind.com> References: <1421637666-16872-1-git-send-email-helin.zhang@intel.com> <1422501365-12643-1-git-send-email-helin.zhang@intel.com> <54CB879D.2010505@6wind.com> <54CF617B.5010009@6wind.com> <2601191342CEEE43887BDE71AB977258213E28EC@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: "Ananyev, Konstantin" , "Zhang, Helin" , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: <2601191342CEEE43887BDE71AB977258213E28EC-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Konstantin, On 02/02/2015 06:20 PM, Ananyev, Konstantin wrote: >> I think the API should describe for each packet type what can be >> expected by the application. Here is an example. When a driver sets the >> RTE_PTYPE_L3_IPV4 type, it means that: >> >> - the layer 3 is identified as IP by underlying layer (ex: ethertype=IP >> if layer 2 is ethernet) >> - the IP version field is 4 >> - there is no IP options (i.e the size of header is 20) > > Yes, I suppose that's what supported HW can guarantee when RTE_PTYPE_L3_IPV4 is set. > >> - the checksum field has been verified by hw, and if wrong, the >> flag PKT_RX_IP_CKSUM_BAD is set > > Hmm, why is that? > As I remember on many devices it is configurable by SW should HW do RX checksum offload or not. > From DPDK point of view there is hw_ip_checksum field in rte_eth_rxmode. > So it is a possible situation, when at RX HW does packet type determination, but doesn't make L3/L4 > checksum calculation. > > I suppose for checksum(s) it should be a separate flags (in ol_flags) with 3 possible values: > CKSUM_UNKNOWN, CKSUM_BAD, CKSUM_OK. Indeed you are right, it's probably better to have specific flags for checksum. Regards, Olivier