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 915C0A04FD for ; Mon, 4 Apr 2022 03:03:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 660894068C; Mon, 4 Apr 2022 03:03:38 +0200 (CEST) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by mails.dpdk.org (Postfix) with ESMTP id 278E04068C; Mon, 4 Apr 2022 03:03:37 +0200 (CEST) Received: by mail-qk1-f178.google.com with SMTP id w141so6523738qkb.6; Sun, 03 Apr 2022 18:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GdIlIkwkeC6A+gh3IEtKpephGpp9qxARnFS0Qjmobzc=; b=hAy7OMLPYfloJBhZcMkLJI1YO7IRo/IqDC/frgnghz1YO2DS56ao87wIxTHp/yH91S tUKZNflRjH27mc9Yu/UJ4J4CEmxRWr0103ORh+WPfKBBv7dz93ZtWlfSQiSq8G+X55KV t7H8gGqdQh1IO71Kt9vqfsDsi74fVlPuTYGVh80zvWUq7g9TAjOIzIMkGYAeR3JDL2gi o9d2wlNW2IX7O2lll88COIX+emG1UI0b2Iw7CAwn5JWWakuRJn/QZrEsrlbT+QpsApSi p29xQgkhASjIO1HeruhF85mzdt/5FRsripGcw8M0BkLunXpBXkzE5bIul+bx+PiLRJWk SQrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GdIlIkwkeC6A+gh3IEtKpephGpp9qxARnFS0Qjmobzc=; b=b3yqc1EUyaYMP8rwxe6OlL7nPQOCR/5P6BKuV9AOgJ8fKlSS0jTjL6Rhh60cwCNAsn 3O5cG9PzyIKGfLKuwe9ff5AXbwV5ca2M9Y9lBjRcCzD5nJm/NleSlmPq6wXc99Oub8UM nAgc5n5RKURjJVscIHVbz5AApqtaJXfXjDAWOXQYZtfMzB3ySsZIDfXPeYLkcBhiAptX k5iDsFw3qJSDMzc55zUOb6Qgi4tNeWLG6XmKnDGcJptHOGvHPw0VL7hTrcmTypJQbsOU CGCR8vDy344hSQMVrbczsGrTw0EDjB6rmASdv3rCxpQkjQSm4a6XwICcO91aQ4FwCwU2 aqTg== X-Gm-Message-State: AOAM530yIwKNSBPjkIlefqSrC5UuAcRf4eH3m6Fj7Gi0UxEi8S4E514D uASypxokffMDR3/3lBcjtZxobsGw4ZGQ8Q== X-Google-Smtp-Source: ABdhPJz03XZ2bupkpLfJysptYqyHSxKMwCy3wdE9B7jdFj/IqOGjFCpwJc3jgwMyJpMoaduFvXIvdg== X-Received: by 2002:a05:620a:1929:b0:67d:74f0:a957 with SMTP id bj41-20020a05620a192900b0067d74f0a957mr12408696qkb.743.1649034216140; Sun, 03 Apr 2022 18:03:36 -0700 (PDT) Received: from lvdi-01-iad-l.blue.trinitycyber.com ([38.142.224.194]) by smtp.gmail.com with ESMTPSA id 70-20020a370649000000b0067b4cd8ffbasm5413931qkg.60.2022.04.03.18.03.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Apr 2022 18:03:35 -0700 (PDT) From: Ben Magistro To: dev@dpdk.org Cc: ben.magistro@trinitycyber.com, stefan.baranoff@trinitycyber.com, stable@dpdk.org, Ben Magistro Subject: [PATCH] mbuf: expose outer vlan in mbuf dump Date: Mon, 4 Apr 2022 00:56:35 +0000 Message-Id: <20220404005634.2657-1-koncept1@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Enable printing of the outer vlan if flags indicate it is present. Signed-off-by: Ben Magistro --- While troubleshooting some QinQ offloads with various Intel i40e firmware[1], it was helpful to expose the outer vlan in the dump mbuf calls. This should be straightforward to backport and happy to do the work if accepted. I understand that this may not be a widely supported capability at this time, so we are okay if this is not accepted and we just maintain a local patch. --- lib/mbuf/rte_mbuf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c index 87592faccb..a2307cebe6 100644 --- a/lib/mbuf/rte_mbuf.c +++ b/lib/mbuf/rte_mbuf.c @@ -674,6 +674,9 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len) fprintf(f, " pkt_len=%u, ol_flags=%#"PRIx64", nb_segs=%u, port=%u", m->pkt_len, m->ol_flags, m->nb_segs, m->port); + if (m->ol_flags & (RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_TX_QINQ)) + fprintf(f, ", vlan_tci_outer=%u", m->vlan_tci_outer); + if (m->ol_flags & (RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_TX_VLAN)) fprintf(f, ", vlan_tci=%u", m->vlan_tci); -- 2.27.0