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
| ||
|
Date: Thu, 2 Oct 2014 09:06:44 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Raghuram Kothakota' <Raghuram.Kothakota@...cle.com>, David L Stevens <david.stevens@...cle.com> CC: David Miller <davem@...emloft.net>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, Sowmini Varadhan <sowmini.varadhan@...cle.com> Subject: RE: [PATCHv9 net-next 2/4] sunvnet: make transmit path zero-copy in the kernel From: Raghuram Kothakota > Sorry I am late in providing my comments, but I feel it is important > to share this comment. A comment on the original patch... ... > > @@ -811,14 +930,27 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) > > > > d = vio_dring_cur(dr); > > > > - tx_buf = port->tx_bufs[dr->prod].buf; > > - skb_copy_from_linear_data(skb, tx_buf + VNET_PACKET_SKIP, skb->len); > > + txi = dr->prod; > > + > > + freeskbs = vnet_clean_tx_ring(port, &pending); > > + > > + BUG_ON(port->tx_bufs[txi].skb); > > > > len = skb->len; > > - if (len < ETH_ZLEN) { > > + if (len < ETH_ZLEN) > > len = ETH_ZLEN; > > - memset(tx_buf+VNET_PACKET_SKIP+skb->len, 0, len - skb->len); > > + Aren't you transmitting 'random' bytes from the end of the data? Plausibly they might not even be mapped. Also, for short frames the copy could well be faster - especially on systems with non-trivial iommu. It is also worth checking whether the original copy was aligned. David -- 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