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 19938A0521; Tue, 3 Nov 2020 08:33:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B830BE7B; Tue, 3 Nov 2020 08:33:33 +0100 (CET) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by dpdk.org (Postfix) with ESMTP id 6A020BE6F for ; Tue, 3 Nov 2020 08:33:31 +0100 (CET) Received: by mail-il1-f176.google.com with SMTP id g7so15252846ilr.12 for ; Mon, 02 Nov 2020 23:33:31 -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; bh=E+bmWCKQ20JXz9fUArRks3ikPHo6nhm7sqLRP8wURAk=; b=cpPmaSfG/sT1Q3D0mKz4xttHblSyXQ3g4kYHv7FFhxUYP8P/eRvrO0F35HYlshzVNd XJBKZ1RK+HoW3PuPExzZJvwoqmlZfF9mKCZITLbGjnqLhp7MulUvC61tevp+97LhEt0Z G1dmDO3ciMZR1m89bZ3tKvtfzQfUPclF2awOMb+tYKywh93rNbiUMiBGU8UX0QTDkeGr pAu+Ls1lq4QjcSa1ipOeCbB3JQosmF/DDmJmzbMnDCsCJAO5zZ4GKiKQwMhfaAmV+Xn8 mv2hi0WIPB/IZR1/kBX/Q0el7Hby7xGMjOMgDArDDgfQskpSupjAagJm4zuh0ZYTN735 uFrQ== 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; bh=E+bmWCKQ20JXz9fUArRks3ikPHo6nhm7sqLRP8wURAk=; b=XN1/XMlVWvcfnNDArZ/ViNmNk+zFw+Onutr52jM61bsR59bRLeXy9Z9/gxQ9tuTO3Z iXX0oemaa79mp7CdXo6Lam6a24RtvZXrFFT0clpRg3OXGryRmVL7LTy7u0Hqc4kZR1F2 8IBeYlQrE/8V6lzZVAhs043MbHfmsFHvf1w9lfhhLATp2njanV1cp/HphIQZzCJB8hBO CEGDBaRIntHLxhHZZ5NrhcHHiPi1Be489D+yIQ2UEdoodfgQY2HOHhlcMACUlMA/pg7F NLrt7QEv5zZ8yK8ldGQqoZb2SZyMeN5zNGWkZ2/1KGKxDztj/afp9Jc5XzWqO6fi+IDO dEAQ== X-Gm-Message-State: AOAM532WL/tyIHWx8V5A3ARFrLLbXs50Vx1lmGT02XLK4PxDGv48ae2r RwrlYyXOF1fsJefYrXFNQTVY6ZwJ8niqEQJo9vlFpMpZ X-Google-Smtp-Source: ABdhPJzZ7bCaMpxteEnDed9kEdEMJfq0Aqc13npY8nRe8XJyEY56pkOYdT78Qal56duv7C+VjlCWzdw5hRPhFMmV91M= X-Received: by 2002:a05:6e02:cf:: with SMTP id r15mr13250531ilq.181.1604388809412; Mon, 02 Nov 2020 23:33:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Levend Sayar Date: Tue, 3 Nov 2020 10:32:53 +0300 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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" 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 >