Re: [PATCH v3] net: hyperv: add support for vlans in netvsc driver

From: Sriram Krishnan (srirakr2)
Date: Wed Jul 22 2020 - 06:44:54 EST


On 22/07/20, 3:48 AM, "Haiyang Zhang" <haiyangz@xxxxxxxxxxxxx> wrote:
> If you make this change, did you see any drop in a live test? The
> "packet->total_bytes" in struct hv_netvsc_packet is for book keeping
> only, which is used for stats info, and not visible by the host at all.

> I made this suggestion because the "regular" vlan packet length was
> counted by bytes without the VLAN_HLEN(4) -- the vlan tag is
> in the skb metadata, separately from the ethernet header. I want the
> statistical data for AF_PACKET mode consistent with the regular case.

> struct hv_netvsc_packet {
> /* Bookkeeping stuff */
> u8 cp_partial; /* partial copy into send buffer */

> u8 rmsg_size; /* RNDIS header and PPI size */
> u8 rmsg_pgcnt; /* page count of RNDIS header and PPI */
> u8 page_buf_cnt;

> u16 q_idx;
> u16 total_packets;

> u32 total_bytes;
> u32 send_buf_index;
> u32 total_data_buflen;
> };

> Thanks
> - Haiyang

Sorry my bad, found out that the drop was a testbed issue and not related to the change. Patch v5 contains the recommendation.

Thanks,
Sriram