linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sriram Krishnan (srirakr2)" <srirakr2@cisco.com>
To: David Miller <davem@davemloft.net>
Cc: "kys@microsoft.com" <kys@microsoft.com>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"sthemmin@microsoft.com" <sthemmin@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	"Malcolm Bumgardner (mbumgard)" <mbumgard@cisco.com>,
	"Umesha G M (ugm)" <ugm@cisco.com>,
	"Niranjan M M (nimm)" <nimm@cisco.com>,
	"xe-linux-external(mailer list)" <xe-linux-external@cisco.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] net: hyperv: add support for vlans in netvsc driver
Date: Tue, 21 Jul 2020 07:09:53 +0000	[thread overview]
Message-ID: <292C3F77-60F5-4D24-8541-BCAE88C836AF@cisco.com> (raw)
In-Reply-To: <20200720.162726.1756372964350832473.davem@davemloft.net>



On 21/07/20, 4:57 AM, "David Miller" <davem@davemloft.net> wrote:

    From: Sriram Krishnan <srirakr2@cisco.com>
    Date: Mon, 20 Jul 2020 22:15:51 +0530

    > +	if (skb->protocol == htons(ETH_P_8021Q)) {
    > +		u16 vlan_tci = 0;
    > +		skb_reset_mac_header(skb);

   > Please place an empty line between basic block local variable declarations
   > and actual code.

    > +				netdev_err(net,"Pop vlan err %x\n",pop_err);

    > A space is necessary before "pop_err".

Consolidated list of comments addressed:
> 1. Blank line between declaration and code.
Done

> 2. Error handling is different than other parts of this code.
>   probably just need a goto drop on error.
Done

> It seems like you are putting into message, then driver is putting
> it into meta-data in next code block. Maybe it should be combined?
Not done
This was on purpose. Merging the two code blocks might break existing functionality.
There could be other modes where the packet arrives with 802.1q already in the
Skb and the skb->protocol needn’t be 802.1q.

> packet->total_bytes should be updated too.
Not done.
The total_bytes needs be the total length of packet after the host OS adds the 802.1q header back in
before tx. Updating the total_bytes to -= VLAN_HEADER will lead to packet drop in the Host OS driver.

> Also netvsc already supports vlan in "regular" cases. Please be more specific in the subject.
> Suggested subject: hv_netvsc: add support for vlans in AF_PACKET mode
Done

> A space is necessary before "pop_err".
Done

Uploaded patch v4


  reply	other threads:[~2020-07-21  7:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 16:45 [PATCH v3] net: hyperv: add support for vlans in netvsc driver Sriram Krishnan
2020-07-20 17:34 ` Stephen Hemminger
2020-07-20 17:45 ` Haiyang Zhang
2020-07-20 17:51 ` Haiyang Zhang
2020-07-20 23:27 ` David Miller
2020-07-21  7:09   ` Sriram Krishnan (srirakr2) [this message]
2020-07-21 22:18     ` Haiyang Zhang
2020-07-22 10:44       ` Sriram Krishnan (srirakr2)

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=292C3F77-60F5-4D24-8541-BCAE88C836AF@cisco.com \
    --to=srirakr2@cisco.com \
    --cc=davem@davemloft.net \
    --cc=haiyangz@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbumgard@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=nimm@cisco.com \
    --cc=sthemmin@microsoft.com \
    --cc=ugm@cisco.com \
    --cc=wei.liu@kernel.org \
    --cc=xe-linux-external@cisco.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).