/*
- * Copyright (c) 2010, 2011 Nicira Networks.
- * Distributed under the terms of the GNU GPL version 2.
+ * Copyright (c) 2007-2011 Nicira, Inc.
*
- * Significant portions of this file may be copied from parts of the Linux
- * kernel, by Linus Torvalds and others.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
/* In theory this could be either CHECKSUM_PARTIAL or CHECKSUM_COMPLETE.
* However, on the receive side we should only get CHECKSUM_PARTIAL
* packets from Xen, which uses some special fields to represent this
- * (see vswitch_skb_checksum_setup()). Since we can only make one type work,
- * pick the one that actually happens in practice.
+ * (see vswitch_skb_checksum_setup()). Since we can only make one type
+ * work, pick the one that actually happens in practice.
*
* On the transmit side (basically after skb_checksum_setup()
* has been run or on internal dev transmit), packets with
}
/*
- * forward_ip_summed - map internal checksum state back onto native kernel fields
+ * forward_ip_summed - map internal checksum state back onto native
+ * kernel fields.
*
* @skb: Packet to manipulate.
- * @xmit: Whether we are about send on the transmit path the network stack. This
- * follows the same logic as the @xmit field in compute_ip_summed().
- * Generally, a given vport will have opposite values for @xmit passed to these
- * two functions.
+ * @xmit: Whether we are about send on the transmit path the network stack.
+ * This follows the same logic as the @xmit field in compute_ip_summed().
+ * Generally, a given vport will have opposite values for @xmit passed to
+ * these two functions.
*
* When a packet is about to egress from OVS take our internal fields (including
* any modifications we have made) and recreate the correct representation for
*/
void forward_ip_summed(struct sk_buff *skb, bool xmit)
{
- switch(get_ip_summed(skb)) {
+ switch (get_ip_summed(skb)) {
case OVS_CSUM_NONE:
skb->ip_summed = CHECKSUM_NONE;
break;
}
if (get_ip_summed(skb) == OVS_CSUM_PARTIAL)
- skb_set_transport_header(skb, OVS_CB(skb)->csum_start - skb_headroom(skb));
+ skb_set_transport_header(skb, OVS_CB(skb)->csum_start -
+ skb_headroom(skb));
}
u8 get_ip_summed(struct sk_buff *skb)
*csum_offset = skb->csum;
}
-void set_skb_csum_pointers(struct sk_buff *skb, u16 csum_start, u16 csum_offset)
+void set_skb_csum_pointers(struct sk_buff *skb, u16 csum_start,
+ u16 csum_offset)
{
OVS_CB(skb)->csum_start = csum_start;
skb->csum = csum_offset;