[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120924132753.04c20647@nehalam.linuxnetplumber.net>
Date: Mon, 24 Sep 2012 13:27:53 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: John Fastabend <john.r.fastabend@...el.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 Mon, 24 Sep 2012 13:24:41 -0700
John Fastabend <john.r.fastabend@...el.com> wrote:
> [...]
>
> 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?
It doesn't for GRE and related tunnels.
--
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