[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9165bc8a50f742c79d9b62d00d68aedd@HKXPR3004MB0088.064d.mgd.msft.net>
Date: Tue, 5 Jan 2016 15:53:46 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"driverdev-devel@...uxdriverproject.org"
<driverdev-devel@...uxdriverproject.org>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
KY Srinivasan <kys@...rosoft.com>,
"pebolle@...cali.nl" <pebolle@...cali.nl>,
"stefanha@...hat.com" <stefanha@...hat.com>,
"dan.carpenter@...cle.com" <dan.carpenter@...cle.com>
Subject: RE: [PATCH V5 5/9] Drivers: hv: vmbus: add APIs to send/recv hvsock
packets
> From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com]
> Sent: Tuesday, January 5, 2016 20:39
> ...
> > +/*
> > + * vmbus_sendpacket_hvsock - Send the hvsock payload 'buf' of a length 'len'
> > + */
> > +int vmbus_sendpacket_hvsock(struct vmbus_channel *channel, void *buf,
> u32 len)
> > ...
> > +
> > + bufferlist[0].iov_base = &desc;
> > + bufferlist[0].iov_len = sizeof(struct vmpacket_descriptor);
> > + bufferlist[1].iov_base = &pipe_hdr;
> > + bufferlist[1].iov_len = sizeof(struct vmpipe_proto_header);
> > + bufferlist[2].iov_base = buf;
> > + bufferlist[2].iov_len = len;
> > + bufferlist[3].iov_base = &aligned_data;
> > + bufferlist[3].iov_len = packetlen_aligned - packetlen;
> > +
> > + ret = hv_ringbuffer_write(&channel->outbound, bufferlist, 4,
> > &signal);
>
> Using ARRAY_SIZE(bufferlist) instead of 4 would allow us to keep this
> line untouched when we decide to add something (and compiler will
> optimize it to 4 anyway).
Thanks for the suggestion! I'll fix it.
-- Dexuan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists