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]
Message-Id: <20131028.162858.1940229138245324914.davem@davemloft.net>
Date:	Mon, 28 Oct 2013 16:28:58 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	zajec5@...il.com
Cc:	netdev@...r.kernel.org, openwrt-devel@...ts.openwrt.org
Subject: Re: [RFC TRY#2][PATCH] bgmac: pass received packet to the netif
 instead of copying it

From: Rafaİİ Miİİecki <zajec5@...il.com>
Date: Mon, 28 Oct 2013 18:42:22 +0100

> Copying whole packets with skb_copy_from_linear_data_offset is a pretty
> bad idea. CPU was spending time in __copy_user_common and network
> performance was lower. With the new solution iperf-measured speed
> increased from 116Mb/s to 134Mb/s.
> 
> Another way to improve performance could be switching to build_skb. It
> is cache-specific, so will require testing of various devices.
> 
> Signed-off-by: Rafaİİ Miİİecki <zajec5@...il.com>

Semantically this looks good but it needs some coding style fixes:

The following is indented correctly:

> +				dma_sync_single_for_device(dma_dev,
> +							   slot->dma_addr,
> +							   BGMAC_RX_BUF_SIZE,
> +							   DMA_FROM_DEVICE);
> +				break;
>  			}

However, this is not:

> +			/* Unmap old skb, we'll pass it to the netfif */
> +			dma_unmap_single(dma_dev, old_dma_addr,
> +						BGMAC_RX_BUF_SIZE,
> +						DMA_FROM_DEVICE);
> +

Like the first case, please align the arguments on the second and subsequently
line to start at the first column after the openning parenthesis on the
first line.

Every time I see this not done correctly, it's because the person doing it
is trying to use TAB characters only to indent.  You should be using the
appropriate number of TAB _and_ SPACE characters necessary to get things
lines up properly.
--
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