<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi Morten,</p>
    <div class="moz-cite-prefix">On 7/7/2025 11:00 PM, Morten Brørup
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      
      <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}span.gmail-anegp0gi0b9av8jahpyh
        {mso-style-name:gmail-anegp0gi0b9av8jahpyh;}span.gmailsignatureprefix
        {mso-style-name:gmail_signature_prefix;}span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}.MsoChpDefault
        {mso-style-type:export-only;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
                  Vladimir Medvedkin [<a class="moz-txt-link-freetext" href="mailto:medvedkinv@gmail.com">mailto:medvedkinv@gmail.com</a>] <br>
                  <b>Sent:</b> Monday, 7 July 2025 22.10<br>
                  <br>
                  <o:p></o:p></span></p>
            </div>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
      </div>
    </blockquote>
    <snip>
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><o:p> </o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">That's not quite correct.<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">There are 2 valid usecases, that
                    may bring some ambiguity:<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">    1. Some vendors may support
                    mixing dual/single tagged packets on a physical
                    port, (for example refer to the
                    JunOS flexible-vlan-tagging)<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">    2. Service provider(SP)
                    provides L2 connectivity to a customer, and customer
                    is able to send non tagged frames via SP
                    infrastructure.<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal"><o:p> </o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">Thus, upon receive single tagged
                    packet at the SP exit node (the switch customer is
                    connected to) how does it distinguish (w/o reading
                    local configuration, i.e. VLAN A - QinQ outer tag,
                    vlans B and C - regular VLANs) <span class="gmail-anegp0gi0b9av8jahpyh">whether</span> the
                    packet is non tagged encapsulated into SP's QinQ, or
                    a regular VLAN packet belonging to the internal SP
                    infrastructure?<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal"><span class="gmail-anegp0gi0b9av8jahpyh">In</span> <span class="gmail-anegp0gi0b9av8jahpyh">each</span> <span class="gmail-anegp0gi0b9av8jahpyh">case</span>,
                    NIC has to <span class="gmail-anegp0gi0b9av8jahpyh">place</span>
                    the <span class="gmail-anegp0gi0b9av8jahpyh">VLAN</span>
                    <span class="gmail-anegp0gi0b9av8jahpyh">tag</span>
                    <span class="gmail-anegp0gi0b9av8jahpyh">in</span> <span class="gmail-anegp0gi0b9av8jahpyh">different</span>
                    <span class="gmail-anegp0gi0b9av8jahpyh">places</span>
                    of the <span class="gmail-anegp0gi0b9av8jahpyh">descriptor/mbuf</span>.<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
                      was trying to make the point that QinQ stripping
                      only needs to support 2, 1, or 0 tags, it doesn’t
                      need an option to support only 2 or 0 tags (and
                      disallow 1 tag).<o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    that's correct
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m
                      not sure I understand your example.<o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Are
                      you talking about packets ingressing on a backbone
                      port (i.e. not a customer-facing port) on a
                      DPDK-based SP exit node?</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    yes
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">And
                      the backbone is using one individual VLAN ID per
                      customer?</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    yes
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">So
                      customers’ untagged traffic is VLAN tagged packets
                      in the backbone, and customers VLAN tagged traffic
                      is double tagged packets in the backbone?</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    yes
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In
                      such a case, the VLAN ID used internally for
                      infrastructure/management purposes by the SP will
                      be reserved, and not assigned to any customer.</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Indeed, SP usually allocate VLAN tags in blocks and uses them for
    different purposes. For example, vlans 100-200 for internal infra
    and vlans 500-1000 for customers QinQ. This allocation scheme is
    individual for every SP. And this piece of information helps to <span style="white-space: pre-wrap;">to </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="26:8" style="white-space: pre-wrap;">distinguish </span>QinQ from a
    regular VLAN.
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">And
                      you suggest putting the VLAN ID of the single
                      tagged packets in the vlan_tci_outer and set
                      RTE_MBUF_F_RX_QINQ but not RTE_MBUF_F_RX_VLAN,
                      instead of treating them as normal VLAN tagged
                      packets?</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <p>Oh no. <span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="0:1" style="white-space: pre-wrap;">I</span><span style="white-space: pre-wrap;">'m </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="2:6" style="white-space: pre-wrap;">just</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="9:8" style="white-space: pre-wrap;">pointing</span><span style="white-space: pre-wrap;"> out </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="18:2" style="white-space: pre-wrap;">the</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="21:15" style="white-space: pre-wrap;">fundamental</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="37:8" style="white-space: pre-wrap;">problem</span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="45:1" style="white-space: pre-wrap;">,</span><span style="white-space: pre-wrap;"> which </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="47:13" style="white-space: pre-wrap;">is</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="61:1" style="white-space: pre-wrap;">the</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="63:13" style="white-space: pre-wrap;">inability</span><span style="white-space: pre-wrap;"> to </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="77:10" style="white-space: pre-wrap;">recognize</span><span style="white-space: pre-wrap;"> from </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="88:2" style="white-space: pre-wrap;">a</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="91:6" style="white-space: pre-wrap;">single</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="98:11" style="white-space: pre-wrap;">tagged</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="110:6" style="white-space: pre-wrap;">packet</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="118:11" style="white-space: pre-wrap;">whether</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="130:2" style="white-space: pre-wrap;">it</span><span style="white-space: pre-wrap;"> is an untagged customer </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="160:7" style="white-space: pre-wrap;">packet</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="168:6" style="white-space: pre-wrap;">inside</span><span style="white-space: pre-wrap;"> the </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="175:4" style="white-space: pre-wrap;">QinQ</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="180:1" style="white-space: pre-wrap;">S</span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="181:1" style="white-space: pre-wrap;">-</span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="182:4" style="white-space: pre-wrap;">VLAN</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="187:3" style="white-space: pre-wrap;">or</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="191:6" style="white-space: pre-wrap;">just</span><span style="white-space: pre-wrap;"> a </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="198:7" style="white-space: pre-wrap;">regular</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="206:4" style="white-space: pre-wrap;">VLAN</span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="210:1" style="white-space: pre-wrap;">,</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="212:2" style="white-space: pre-wrap;">due</span><span style="white-space: pre-wrap;"> to </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="215:2" style="white-space: pre-wrap;">the</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="218:10" style="white-space: pre-wrap;">lack</span><span style="white-space: pre-wrap;"> of the </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="229:14" style="white-space: pre-wrap;">above mentioned</span><span style="white-space: pre-wrap;"> </span><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="244:10" style="white-space: pre-wrap;">information inside a NIC parsing pipeline.</span></p>
    <p><span class="aNeGP0gI0B9AV8JaHPyH" data-src-align="244:10" style="white-space: pre-wrap;">So, given that, I'm pretty much aligned with Bruce in his suggestion in a following mail. We can also add a note into documentation reflecting single tagged stripping behaviour for a QinQ usecase, so developers should keep in mind when they rely on vlan/QinQ stripping in their QinQ-capable dataplane. Or, as an extra, we can introduce devarg controlling where to put that tag.</span></p>
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">OK,
                      then the “superfluous” VLAN stripping flag could
                      be used for indicating which mbuf field
                      vlan_tci/vlan_tci_outer the VLAN ID of single VLAN
                      tagged packets should go into, when QinQ stripping
                      is enabled.<o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">But:
                      If QinQ/VLAN stripping is not enabled, the VLAN ID
                      of such a single VLAN tagged packet will still go
                      into the mbuf->vlan_tci field with
                      RTE_MBUF_F_RX_VLAN (but not
                      RTE_MBUF_F_RX_VLAN_STRIPPED) set.<o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">So
                      I don’t think such flexibility about where to put
                      the VLAN ID of single VLAN tagged packets is a
                      good idea, if such optional behavior is only
                      available when stripping the VLAN/QinQ tags, but
                      not when simply parsing the VLAN/QinQ tagged
                      packets.<o:p></o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
                  <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If
                      you are talking about a backbone using QinQ with
                      individual {outer, inner} ID pair per customer,
                      VLAN tagged customer traffic will be triple tagged
                      packets in such a backbone.</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    No, I'm not talking about that. I haven't heard if anyone used this
    in practice and I faced with some switches that just start
    misbehaving after receiving triple tagged VLAN packets.
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <div>
                  <p class="MsoNormal"><o:p> </o:p></p>
                </div>
                <blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
                  <p class="MsoNormal"><br>
                  </p>
                </blockquote>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <snip>
    <blockquote type="cite" cite="mid:98CBD80474FA8B44BF855DF32C47DC35E9FD99@smartserver.smartshare.dk">
      <div class="WordSection1">
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
          <div>
            <div>
              <div>
                <p class="MsoNormal"><br clear="all">
                  <o:p></o:p></p>
              </div>
              <p class="MsoNormal"><br>
                <span class="gmailsignatureprefix">-- </span><o:p></o:p></p>
              <div>
                <div>
                  <div>
                    <p class="MsoNormal">Regards,<o:p></o:p></p>
                  </div>
                  <p class="MsoNormal">Vladimir<o:p></o:p></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Regards,
Vladimir</pre>
  </body>
</html>