~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to datapath/actions.c

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2007-2012 Nicira, Inc.
 
2
 * Copyright (c) 2007-2013 Nicira, Inc.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or
5
5
 * modify it under the terms of version 2 of the GNU General Public
132
132
        if (unlikely(err))
133
133
                return err;
134
134
 
 
135
        if (get_ip_summed(skb) == OVS_CSUM_COMPLETE)
 
136
                skb->csum = csum_sub(skb->csum, csum_partial(eth_hdr(skb),
 
137
                                                             ETH_ALEN * 2, 0));
 
138
 
135
139
        memcpy(eth_hdr(skb)->h_source, eth_key->eth_src, ETH_ALEN);
136
140
        memcpy(eth_hdr(skb)->h_dest, eth_key->eth_dst, ETH_ALEN);
137
141
 
 
142
        if (get_ip_summed(skb) == OVS_CSUM_COMPLETE)
 
143
                skb->csum = csum_add(skb->csum, csum_partial(eth_hdr(skb),
 
144
                                                             ETH_ALEN * 2, 0));
 
145
 
138
146
        return 0;
139
147
}
140
148
 
376
384
        const struct nlattr *a;
377
385
        int rem;
378
386
 
 
387
        BUG_ON(!OVS_CB(skb)->pkt_key);
 
388
 
379
389
        upcall.cmd = OVS_PACKET_CMD_ACTION;
380
 
        upcall.key = &OVS_CB(skb)->flow->key;
 
390
        upcall.key = OVS_CB(skb)->pkt_key;
381
391
        upcall.userdata = NULL;
382
392
        upcall.portid = 0;
383
393