-Original Message-
From: Long Li
Sent: Friday, February 9, 2024 1:14 AM
To: stephen ; Alan Elder
Cc: dev@dpdk.org
Subject: RE: [PATCH v2] net/netvsc: fix parsing of VLAN metadata
>
> Most of this driver came from FreeBSD. Did you look there to make sure
> naming is the
> > +struct ndis_pkt_vlan_info {
> > + union {
> > + struct {
> > + uint32_t pri:3; /* User
> > Priority */
> > + uint32_t cfi:1; /* Canonical
> > Format ID / DEI */
> >
On Thu, 8 Feb 2024 14:42:44 +
Alan Elder wrote:
> + struct ndis_pkt_vlan_info *vlan = (struct
> ndis_pkt_vlan_info *)pi_data;
> + vlan->value = 0;
> + vlan->vlanid = (m->vlan_tci & HN_VLAN_VID_MASK);
> +
The previous code incorrectly parsed the VLAN ID and priority.
If the 16-bits of VLAN ID and priority/CFI on the wire was
0123456789ABCDEF the code parsed it as 456789ABCDEF3012. There
were macros defined to handle this conversion but they were not
used.
This fix takes an approach similar to the
4 matches
Mail list logo