lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Feb 2014 15:36:20 +0000
From:	Wei Liu <wei.liu2@...rix.com>
To:	Andrew Bennieston <andrew.bennieston@...rix.com>
CC:	Wei Liu <wei.liu2@...rix.com>, <xen-devel@...ts.xenproject.org>,
	<ian.campbell@...rix.com>, <paul.durrant@...rix.com>,
	<netdev@...r.kernel.org>
Subject: Re: [PATCH V2 net-next 2/5] xen-netback: Add support for multiple
 queues

On Fri, Feb 14, 2014 at 02:57:25PM +0000, Andrew Bennieston wrote:
> On 14/02/14 14:11, Wei Liu wrote:
> >On Fri, Feb 14, 2014 at 11:50:21AM +0000, Andrew J. Bennieston wrote:
> >[...]
> >>
> >>+extern unsigned int xenvif_max_queues;
> >>+
> >>  #endif /* __XEN_NETBACK__COMMON_H__ */
> >>diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> >>index 4cde112..4dc092c 100644
> >>--- a/drivers/net/xen-netback/interface.c
> >>+++ b/drivers/net/xen-netback/interface.c
> >>@@ -373,7 +373,12 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
> >>  	char name[IFNAMSIZ] = {};
> >>
> >>  	snprintf(name, IFNAMSIZ - 1, "vif%u.%u", domid, handle);
> >>-	dev = alloc_netdev_mq(sizeof(struct xenvif), name, ether_setup, 1);
> >>+	/* Allocate a netdev with the max. supported number of queues.
> >>+	 * When the guest selects the desired number, it will be updated
> >>+	 * via netif_set_real_num_tx_queues().
> >>+	 */
> >>+	dev = alloc_netdev_mq(sizeof(struct xenvif), name, ether_setup,
> >>+						  xenvif_max_queues);
> >
> >Indentation.
> 
> How would you like this to be indented? The CodingStyle says (and I quote):
> Chapter 2: Breaking long lines and strings:
> 	... descendants are always substantially shorter than the
> 	parent and placed substantially to the right...
> 
> There is no further advice to this point in CodingStyle, so please
> explain how you'd prefer this.
> 

Kernel code in general use indentation style like

	dev = alloc_netdev_mq(sizeof(struct xenvif), name, ether_setup,
			      xenvif_max_queues);

You can find lots of examples in existing kernel code.

Probably "place substantially to the right" is just too vague. :-)

Wei.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ