Fixed some space/tab issues.
authorJustin Pettit <jpettit@nicira.com>
Sun, 30 Mar 2008 08:37:33 +0000 (01:37 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sun, 30 Mar 2008 08:37:33 +0000 (01:37 -0700)
datapath/flow.c
datapath/snap.h

index 1807db300124e56f43ac28dd8a7f868d17aecb2b..a755947bf2b31b1e590d4aec615aa07ce3f96dd0 100644 (file)
@@ -225,12 +225,12 @@ void flow_extract(struct sk_buff *skb, uint16_t in_port,
        }
 
        /* Check for a VLAN tag */
-       if (likely(key->dl_type != __constant_htons(ETH_P_8021Q))) {
-               key->dl_vlan = __constant_htons(OFP_VLAN_NONE);
+       if (likely(key->dl_type != htons(ETH_P_8021Q))) {
+               key->dl_vlan = htons(OFP_VLAN_NONE);
        } else {
                struct vlan_hdr *vh = (struct vlan_hdr *)(skb_mac_header(skb) + nh_ofs);
                key->dl_type = vh->h_vlan_encapsulated_proto;
-               key->dl_vlan = vh->h_vlan_TCI & __constant_htons(VLAN_VID_MASK);
+               key->dl_vlan = vh->h_vlan_TCI & htons(VLAN_VID_MASK);
                nh_ofs += sizeof(*vh);
        }
        memcpy(key->dl_src, mac->h_source, ETH_ALEN);
@@ -279,7 +279,7 @@ void flow_extract(struct sk_buff *skb, uint16_t in_port,
                        goto no_th;
                }
        } else {
-                /* Fall through. */
+               /* Fall through. */
        }
 
        key->nw_src = 0;
index 5eee1dc74c8bf2e6a2129468b80f97ad6fdd4c32..02ff18f2b861e37750c273c9fec04aa49591da34 100644 (file)
@@ -8,25 +8,25 @@
 
 struct snap_hdr
 {
-    uint8_t  dsap;  /* Always 0xAA */
-    uint8_t  ssap;  /* Always 0xAA */
-    uint8_t  ctrl;
-    uint8_t  oui[SNAP_OUI_LEN];
-    uint16_t ethertype;
+       uint8_t  dsap;  /* Always 0xAA */
+       uint8_t  ssap;  /* Always 0xAA */
+       uint8_t  ctrl;
+       uint8_t  oui[SNAP_OUI_LEN];
+       uint16_t ethertype;
 } __attribute__ ((packed));
 
 static inline int snap_get_ethertype(struct sk_buff *skb, uint16_t *ethertype)
 {
-    struct snap_hdr *sh = (struct snap_hdr *)(skb->data 
-                        + sizeof(struct ethhdr));
-    if (((sh->dsap & 0xFE) != LLC_SAP_SNAP) 
-                || ((sh->dsap & 0xFE) != LLC_SAP_SNAP)
-                || (!memcmp(sh->oui, "\0\0\0", SNAP_OUI_LEN)))
-        return -EINVAL;
+       struct snap_hdr *sh = (struct snap_hdr *)(skb->data 
+                               + sizeof(struct ethhdr));
+       if (((sh->dsap & 0xFE) != LLC_SAP_SNAP) 
+                               || ((sh->dsap & 0xFE) != LLC_SAP_SNAP)
+                               || (!memcmp(sh->oui, "\0\0\0", SNAP_OUI_LEN)))
+               return -EINVAL;
 
-    *ethertype = sh->ethertype;
+       *ethertype = sh->ethertype;
 
-    return 0;
+       return 0;
 }
 
 #endif /* snap.h */