netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: KY Srinivasan <kys@microsoft.com>
To: Joe Perches <joe@perches.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"apw@canonical.com" <apw@canonical.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: RE: [PATCH V5 1/1] hv_netvsc: Use the xmit_more skb flag to optimize signaling the host
Date: Mon, 11 May 2015 08:59:53 +0000	[thread overview]
Message-ID: <BY2PR0301MB0711C1248DF6677217A310BCA0DB0@BY2PR0301MB0711.namprd03.prod.outlook.com> (raw)
In-Reply-To: <1431323894.2884.4.camel@perches.com>



> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Sunday, May 10, 2015 10:58 PM
> To: KY Srinivasan
> Cc: davem@davemloft.net; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com
> Subject: Re: [PATCH V5 1/1] hv_netvsc: Use the xmit_more skb flag to
> optimize signaling the host
> 
> On Sun, 2015-05-10 at 21:08 -0700, K. Y. Srinivasan wrote:
> > Based on the information given to this driver (via the xmit_more skb flag),
> > we can defer signaling the host if more packets are on the way. This will
> help
> > make the host more efficient since it can potentially process a larger batch
> of
> > packets. Implement this optimization.
> 
> trivia:
> 
> I think that indirecting
> VMBUS_DATA_PACKET_FLAG_COMPLETTION_REQUESTED
> into a non-const temporary isn't very useful.
> 
> Whenever overly long identifiers like VMBUS_<FOO> is used,
> I think that it'd be better to use it directly and ignore
> 80 column warnings.

Thanks Joe; if Dave agrees, I can send v6 of this patch out.

Regards,

K. Y
> 
> Same with the "sizeof(struct nvsp_message)" on two lines.
> 
> > diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
> []
> > @@ -743,6 +743,8 @@ static inline int netvsc_send_pkt(
> >  	u64 req_id;
> >  	int ret;
> >  	struct hv_page_buffer *pgbuf;
> > +	u32 vmbus_flags =
> VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
> > +	u32 ring_avail = hv_ringbuf_avail_percent(&out_channel-
> >outbound);
> []
> > @@ -769,30 +771,41 @@ static inline int netvsc_send_pkt(
> []
> > +		ret = vmbus_sendpacket_pagebuffer_ctl(out_channel,
> > +						      pgbuf,
> > +						      packet->page_buf_cnt,
> > +						      &nvmsg,
> > +						      sizeof(struct
> > +							     nvsp_message),
> > +						      req_id,
> > +						      vmbus_flags,
> > +						      !packet->xmit_more);
> 
> []
> 
> >  			netif_tx_stop_queue(netdev_get_tx_queue(
> >  					    ndev, q_idx));
> 
> This could be on one line too.
> 

  reply	other threads:[~2015-05-11  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11  4:08 [PATCH V5 1/1] hv_netvsc: Use the xmit_more skb flag to optimize signaling the host K. Y. Srinivasan
2015-05-11  5:58 ` Joe Perches
2015-05-11  8:59   ` KY Srinivasan [this message]
2015-05-11 14:41     ` David Miller

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=BY2PR0301MB0711C1248DF6677217A310BCA0DB0@BY2PR0301MB0711.namprd03.prod.outlook.com \
    --to=kys@microsoft.com \
    --cc=apw@canonical.com \
    --cc=davem@davemloft.net \
    --cc=devel@linuxdriverproject.org \
    --cc=jasowang@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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).