DPDK patches and discussions
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Wei Hu <weh@linux.microsoft.com>,
	"ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
	"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
	"thomas@monjalon.net" <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Wei Hu <weh@microsoft.com>
Subject: RE: [PATCH v2 1/1] net/mana: add vlan tagging support
Date: Tue, 12 Mar 2024 19:55:12 +0000	[thread overview]
Message-ID: <SJ1PR21MB34577B51975E473513E8BCC9CE2B2@SJ1PR21MB3457.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20240312093611.359025-1-weh@linux.microsoft.com>

> --- a/drivers/net/mana/rx.c
> +++ b/drivers/net/mana/rx.c
> @@ -532,6 +532,21 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts,
> uint16_t pkts_n)
>  			mbuf->hash.rss = oob-
> >packet_info[pkt_idx].packet_hash;
>  		}
> 
> +		if (oob->rx_vlan_tag_present) {
> +			mbuf->ol_flags |=
> +				RTE_MBUF_F_RX_VLAN |
> RTE_MBUF_F_RX_VLAN_STRIPPED;
> +			mbuf->vlan_tci = oob->rx_vlan_id;
> +
> +			if (!priv->vlan_strip && rte_vlan_insert(&mbuf)) {
> +				DRV_LOG(ERR, "vlan insert failed");
> +				rxq->stats.errors++;
> +				rte_pktmbuf_free(mbuf);
> +
> +				i++;
> +				goto drop;

This is not correct. On CQE_RX_COALESCED_4, there may be up to 4 packets in a CQE. Need to update pkt_idx on vlan error.

Thanks,

Long

      reply	other threads:[~2024-03-12 19:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12  9:36 Wei Hu
2024-03-12 19:55 ` Long Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ1PR21MB34577B51975E473513E8BCC9CE2B2@SJ1PR21MB3457.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=thomas@monjalon.net \
    --cc=weh@linux.microsoft.com \
    --cc=weh@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).