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:	Mon, 24 Sep 2012 13:24:41 -0700
From:	John Fastabend <john.r.fastabend@...el.com>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	Eric Dumazet <eric.dumazet@...il.com>,
	David Miller <davem@...emloft.net>,
	Chris Wright <chrisw@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCHv3 net-next 3/3] vxlan: virtual extensible lan

[...]

On 9/24/2012 1:02 PM, Stephen Hemminger wrote:
> +
> +/* Transmit local packets over Vxlan
> + *
> + * Outer IP header inherits ECN and DF from inner header.
> + * Outer UDP destination is the VXLAN assigned port.
> + *           source port is based on hash of flow if available
> + *                       otherwise use a random value
> + */
> +static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
> +{
> +	struct vxlan_dev *vxlan = netdev_priv(dev);
> +	struct rtable *rt;
> +	const struct ethhdr *eth;
> +	const struct iphdr *old_iph;
> +	struct iphdr *iph;
> +	struct vxlanhdr *vxh;
> +	struct udphdr *uh;
> +	struct flowi4 fl4;
> +	struct vxlan_fdb *f;
> +	unsigned int pkt_len = skb->len;
> +	unsigned int mtu;
> +	u32 hash;
> +	__be32 dst;
> +	__be16 df = 0;
> +	__u8 tos, ttl;
> +	int err;
> +

[...]

> +	err = ip_local_out(skb);
> +	if (likely(net_xmit_eval(err) == 0)) {
> +		struct vxlan_stats *stats = this_cpu_ptr(vxlan->stats);
> +
> +		u64_stats_update_begin(&stats->syncp);
> +		stats->tx_packets++;
> +		stats->tx_bytes += pkt_len;

Should pkt_len include the outer headers?

> +		u64_stats_update_end(&stats->syncp);
> +	} else {
> +		dev->stats.tx_errors++;
> +		dev->stats.tx_aborted_errors++;
> +	}
> +	return NETDEV_TX_OK;
> +
> +drop:
> +	dev->stats.tx_dropped++;
> +	goto tx_free;
> +
> +tx_error:
> +	dev->stats.tx_errors++;
> +tx_free:
> +	dev_kfree_skb(skb);
> +	return NETDEV_TX_OK;
> +}

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