From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3A6CEA0548; Fri, 24 Sep 2021 17:11:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0A5D4126F; Fri, 24 Sep 2021 17:11:04 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 4C24E40041 for ; Fri, 24 Sep 2021 17:11:03 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id q23so9109789pfs.9 for ; Fri, 24 Sep 2021 08:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n/YLiSyttGt0+/pJkRrq5+P5KvWiuqZv4v8gd4lnezE=; b=lfOyEhaMv+xmmZPscuTzuWOMIkx4SkZZKEnB/rvN5EXblr+B7V+ZJm3ELpkWMN+sz4 xS6qX4XDwqd4HoWTKF8JJMdeIqnlo6PWwD/VsKEFA3EmmutfOU5qqxpS91pyHUijCDwP nlHb0BlsBf+0AaRMPs7HIsd8jfvLtPCftnR5YqH2vIwDLNKyPjlVXYj5bIyfxEOlHTyD UeA8Mni6oiDNRmnMgWa/LmuUZs56IOaNApD+orIp3NyzyBbwIsOxnw0fKyym58Ie5WOO YvVmQhrgOrxPSEq4+0EOWyniqCfPTLjG4PYiR+NN3PISrHRxfWan4EdCWslC6FnxekyN coMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n/YLiSyttGt0+/pJkRrq5+P5KvWiuqZv4v8gd4lnezE=; b=ooYHkNp4CwLJE87Yr8GsWa6Oo4NpikYnloEBaqbL8pRGyPSgO/YqSziCfG/tmZ7did BbNn4N9qFPcJmzGVqfr4MUnruywSHWDrgd6Vctqh4F2+2m1c1UJx3loWPg/XGZLGa1Yn /LbNtgdTZ9ZQFYOXWu/N4zYixk7mYiX5bTrwLXRJ9XO4Bq1y+XO8/n4dpqUO+jnKv0Mc 9O4B5quhO5S6KAoXkQEQBXin1nkTlmFDLjv1SqFwKOijEFIjYpjFJCuOitth5L0R7nr1 14y3bhLP17mWOXRH5iJ9cttlJkjO+K7L0oXxD8Kgj8hCPJfR0INtNOxrUlAZ6e7IrULc UuDQ== X-Gm-Message-State: AOAM533ACDOKx1ig0Bp5MNXiwLEr9C5Po2k8BBgAhaZC7TUbekD4Uli3 kA5YA8b5cAf8VaFVMPy5hmwGHc1aO1HuoA== X-Google-Smtp-Source: ABdhPJxLwj15KUXjMkXzlkLdGSfbLh4MNuqsQVheYmE6m/GTRLcIh8uI9tJsw7c0PMWFJDgz/Q1e2A== X-Received: by 2002:aa7:83d8:0:b0:3ef:990f:5525 with SMTP id j24-20020aa783d8000000b003ef990f5525mr10554241pfn.29.1632496262015; Fri, 24 Sep 2021 08:11:02 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id e1sm11122173pgi.43.2021.09.24.08.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 08:11:01 -0700 (PDT) Date: Fri, 24 Sep 2021 08:10:58 -0700 From: Stephen Hemminger To: Tudor Cornea Cc: ferruh.yigit@intel.com, linville@tuxdriver.com, andrew.rybchenko@oktetlabs.ru, thomas@monjalon.net, jerinj@marvell.com, dev@dpdk.org Message-ID: <20210924081058.7f6f8a33@hermes.local> In-Reply-To: <1632483885-84732-1-git-send-email-tudor.cornea@gmail.com> References: <1631091558-63337-1-git-send-email-tudor.cornea@gmail.com> <1632483885-84732-1-git-send-email-tudor.cornea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] net/af_packet: reinsert the stripped vlan tag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Fri, 24 Sep 2021 14:44:45 +0300 Tudor Cornea wrote: > +Features and Limitations of the af_packet PMD > +--------------------------------------------- > + > +Since the following commit, the Linux kernel strips the vlan tag > + > +.. code-block:: console > + > + commit bcc6d47903612c3861201cc3a866fb604f26b8b2 > + Author: Jiri Pirko > + Date: Thu Apr 7 19:48:33 2011 +0000 > + > + net: vlan: make non-hw-accel rx path similar to hw-accel > + > +Running on such a kernel results in receiving untagged frames while using > +the af_packet PMD. Fortunately, the stripped information is still available > +for use in ``mbuf->vlan_tci``, and applications could check ``PKT_RX_VLAN_STRIPPED``. > + > +However, we currently don't have a way to describe offloads which can't be > +disabled by PMDs, and this creates an inconsistency with the way applications > +expect the PMD offloads to work, and requires them to be aware of which > +underlying driver they use. > + > +Since release 21.11 the af_packet PMD will implement support for the > +``DEV_RX_OFFLOAD_VLAN_STRIP`` offload, and users can control the desired vlan > +stripping behavior. > + > +It's important to note that the default case will change. If previously, > +the vlan tag was stripped, if the application now requires the same behavior, > +it will need to configure ``rxmode.offloads`` with ``DEV_RX_OFFLOAD_VLAN_STRIP``. > + > +The PMD driver will re-insert the vlan tag transparently to the application > +if the kernel strips it, as long as the ``DEV_RX_OFFLOAD_VLAN_STRIP`` is not > +enabled. This seems like the wrong place for this text. It is not a new feature, it is a bug fix. If you want to describe it as an enhancement, the text should be succinct and describe the situation from user point of view. Something like: Af_packet PMD now works with VLAN's on Linux