From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4E39A0521; Tue, 3 Nov 2020 09:02:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E759C30F; Tue, 3 Nov 2020 09:02:45 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by dpdk.org (Postfix) with ESMTP id 6E4DCBE97 for ; Tue, 3 Nov 2020 09:02:43 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id 13so11756018wmf.0 for ; Tue, 03 Nov 2020 00:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vohoKxW1vvl0aLzdc72hhYZuc5W8qb9v/rYBW1SLz/M=; b=kfuTf8ojxf0fVMOEXOgqA0cuAG9ennTBkcqo7Vwa2X+sWh5zfVJLUYB+0ot913Y476 KURjJDgG9SDrGn2ix8dN6fXIr4eaT1OqupRkj7hQHCr+i/YAXzH9l+29fsNKipFGDXaw BEr71INjVcMe5os6j3KNEMUaKtkcMb70HT+d6NvDdaOiiXe2TzWANOBo1KtBeCs8U2nn u6n1AR3ZXNrkAO54jMPZezY3n75oUTvdZIULDILthi+GrSx7zFsRYoe3Kzn/79gHBV3/ uMjgWEqAc6n332bYPV6Un9gNgeygie7Gbm5ub9CNl1Mx4/f3TSXb/O/WD6VuiACkf6+0 cHGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vohoKxW1vvl0aLzdc72hhYZuc5W8qb9v/rYBW1SLz/M=; b=HFLi3msZNN9irl8Wqm1AVyxR/24TO0khAKNgO4kqQV5QbOZ6i0YPRKF3g5SR57sw1t OZVW/uZ1yz9+FpCQcJcabd3SgVg/AaZWwh2MfKueDBLIXGioPT7vZ+jZpKN5hAuqutHc ZfDTKsPmQcaoxxJg+YDu0tDW/y0gcIuh+8xBVhyZj601IMpHPPlg5i7U1CWWfDCm+M1H WcwmdwqPR+H5x1rkJRosd1hz1ZngPnm6wVmn5bcy/bnk8A57ePMNjlhd3ct9YB+YWfGC xE8xDzPDcwhwbLj6duVxWE5bO1si/XUzlmfwnFOQ8alYwIOXPlbUOOwOfgn5N1vd1NP/ 98KQ== X-Gm-Message-State: AOAM530sxqLNwBpXztB5k1hcENZnF7FPoRPEdOWtV1NVrH2GyBJ84mns L/q37ycn/MarxkXaO/4LqjLllHP8FxaB2QKcRac= X-Google-Smtp-Source: ABdhPJxUpiNRUbVV6tpX+S+zSbCe3Zt78TBvFDQmO6dBJVZAtOvBtbDV+itDNNA+tKpO10aJ/Y3AbPpr/Guxl5NHERU= X-Received: by 2002:a1c:f314:: with SMTP id q20mr2167896wmq.104.1604390563043; Tue, 03 Nov 2020 00:02:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Juhamatti Kuusisaari Date: Tue, 3 Nov 2020 10:02:30 +0200 Message-ID: To: Levend Sayar Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] mbuf->packet_type 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello Levend, The packet type is indeed filled by hw in case there is a support for it. I think your application may be missing a ptype handling function which checks the supported ptype handling of the hw and registers a callback handling in case the hw does not support it. Please see more details e.g. in l3fwd example application about the ptype checks and callback registration. Best regards, -- Juhamatti On Tue, 3 Nov 2020 at 09:33, Levend Sayar wrote: > > Hi all. > > Nobody cared about my mail. Am I in the wrong place? > If so, can you forward me to the right place please? > > Best, > Levend > > On Mon, Nov 2, 2020 at 1:45 PM Levend Sayar wrote: > > > Hi all. > > > > Recently I encountered a dont-know-why issue about mbuf->packet_type. > > > > Two different setups behave differently. > > > > One is a bare metal server, one KVM based OpenStack VM (virtio). > > Both use the uio driver. Namely only hardware is different. Software stack > > is the same. > > > > But this macro does not work on OpenStack platform. > > > > *RTE_ETH_IS_IPV4_HDR(mbuf->packet_type))* > > > > where > > > > *#define RTE_ETH_IS_IPV4_HDR(ptype) ((ptype) & RTE_PTYPE_L3_IPV4)* > > > > I manually coded to check IPv4 like this: > > > > > > > > > > *struct rte_ether_hdr* ether_hdr = rte_pktmbuf_mtod(mbuf, struct > > rte_ether_hdr*);uint16_t ether_type = N2H16(ether_hdr->ether_type);if > > (likely(ether_type == RTE_ETHER_TYPE_IPV4)) {* > > > > Do you have any idea about this? > > I suppose whoever fills that mbuf data packet_type field is not working in > > a virtual environment. > > Which entity fills that fields? Hardware driver, uio, dpdk? > > > > Best, > > Levend > >