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 76401A0547; Wed, 29 Sep 2021 16:14:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EAC99410EB; Wed, 29 Sep 2021 16:14:18 +0200 (CEST) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by mails.dpdk.org (Postfix) with ESMTP id B6742410E5 for ; Wed, 29 Sep 2021 16:14:17 +0200 (CEST) Received: by mail-ed1-f44.google.com with SMTP id y35so9334883ede.3 for ; Wed, 29 Sep 2021 07:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NhIH7V61x56SXKo6fo6ZzGqAK2qvxUNi47LDeWw/6X4=; b=oc+epWR078ueAiXDlJH2Z2FJ+C4Ct09muWChhHhG1rniDSEUOkzDTX2xl4flFpdpiD HInron69W/jEIijIue9Y4CKe+e5K9HREBI+Gd0p1OEKl5BClmynhvWQx2MesK6K5mJGt RX8d/A+qte6uMilpLgP8YZLNl1Pv8X9a5nsrNE+gkgsFZb4V+P3NP9dT0kb9ZChFgcFd 29YN40EcN6prkvATF3Sv6AZIzBEHhSRCWlleo3FgjqdqkGN+P3ddpY36YDyEGQg1x6hm I04FLl3Szujk0/qUdHwwdDYczorHUf1wvxYW7HvhGIR0aggAVFyPg19wQAAnChi6efIb SovA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NhIH7V61x56SXKo6fo6ZzGqAK2qvxUNi47LDeWw/6X4=; b=6Llfn8rSSLVvCQ2XSKYFBk5qED/rWt1gG5lEDuFKpVCybMChyiEETX49iPkZvupnXT t6E6vsHpjUA7HlvLVOds57j3FgT7T2zXwhpJT2rMuGC2A8exji01FWgqhyE2MIjwfdXa g1hT/yZ5qU4+uQg1MNkiPTV1bH7EIUTiN/IOfBXYqZb4/sKVL70Ostc2fSMuXjzL9xC0 OSXOc5LPKcdaVm1SCVQNwrUt2MfgZHpG8GrxVNOFLYkiSSz0so2R9kSxbqmWtoI1Ika9 jnOreOYzjSeg37UTQsta4THgIN5tZ60G1MX9y2vRk1zT2oIfHEjuaNsxyJfr7j2KEaeZ TwJg== X-Gm-Message-State: AOAM533MdeMOddOqgVR0mmt9O6C56vcvRwSXEn92JnQbhnV/oB77hltJ 3ToFWDiHgCltd7pYal5VP0BLz8s7Z68bzhEd894= X-Google-Smtp-Source: ABdhPJxlaQBKBZHJrui+hpDWnQg4gIeZbxFQ6O6vZgP5dgUu9VvVK73n4lwkX/rzmw9eFQj7+1/T1/5hXd4agiW6pyQ= X-Received: by 2002:a05:6402:19a9:: with SMTP id o9mr100608edz.233.1632924837571; Wed, 29 Sep 2021 07:13:57 -0700 (PDT) MIME-Version: 1.0 References: <1631091558-63337-1-git-send-email-tudor.cornea@gmail.com> <1632483885-84732-1-git-send-email-tudor.cornea@gmail.com> <20210924081058.7f6f8a33@hermes.local> In-Reply-To: <20210924081058.7f6f8a33@hermes.local> From: Tudor Cornea Date: Wed, 29 Sep 2021 17:13:46 +0300 Message-ID: To: Stephen Hemminger Cc: Ferruh Yigit , linville@tuxdriver.com, Andrew Rybchenko , Thomas Monjalon , jerinj@marvell.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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" Thanks Stephen, for the suggestion I've sent v4 of the patch, which adds the succinct description in the af_packet documentation.. On Fri, 24 Sept 2021 at 18:11, Stephen Hemminger wrote: > 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 > >