~ubuntu-branches/ubuntu/vivid/openvswitch/vivid-proposed

« back to all changes in this revision

Viewing changes to ofproto/ofproto-dpif.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-06-30 14:34:02 UTC
  • mfrom: (1.1.29)
  • Revision ID: package-import@ubuntu.com-20150630143402-4po65ymgth1ron0w
Tags: 2.3.2-0ubuntu0.15.04.1
* New upstream point release (LP: #1470120):
  - d/p/*: Refresh all patches.
  - d/p/rules: Skip test 717 due to failure on powerpc - see
    http://pad.lv/1472202 for full details.
* d/tests/openflow.py: Use net.addLink to add links between switches and
  hosts to ensure that they get cleanup up after use, fixing autopkgtest
  failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
                                             * dropped. */
54
54
};
55
55
 
 
56
/* Number of implemented OpenFlow tables. */
 
57
enum { N_TABLES = 255 };
 
58
enum { TBL_INTERNAL = N_TABLES - 1 };    /* Used for internal hidden rules. */
 
59
BUILD_ASSERT_DECL(N_TABLES >= 2 && N_TABLES <= 255);
 
60
 
56
61
/* For lock annotation below only. */
57
 
extern struct ovs_rwlock xlate_rwlock;
 
62
extern struct fat_rwlock xlate_rwlock;
58
63
 
59
64
/* Ofproto-dpif -- DPIF based ofproto implementation.
60
65
 *
91
96
                         struct flow_wildcards *, struct rule_dpif **rule,
92
97
                         bool take_ref);
93
98
 
 
99
/* If 'recirc_id' is set, starts looking up from internal table for
 
100
 * post recirculation flows or packets.  Otherwise, starts from table 0. */
 
101
static inline uint8_t
 
102
rule_dpif_lookup_get_init_table_id(const struct flow *flow)
 
103
{
 
104
    return flow->recirc_id ? TBL_INTERNAL : 0;
 
105
}
 
106
 
94
107
enum rule_dpif_lookup_verdict rule_dpif_lookup_from_table(struct ofproto_dpif *,
95
108
                                                          const struct flow *,
96
109
                                                          struct flow_wildcards *,
213
226
 * Post recirculation data path flows are managed like other data path flows.
214
227
 * They are created on demand. Miss handling, stats collection and revalidation
215
228
 * work the same way as regular flows.
 
229
 *
 
230
 * If the bridge which originates the recirculation is different from the bridge
 
231
 * that receives the post recirculation packet (e.g. when patch port is used),
 
232
 * the packet will be processed directly by the recirculation bridge with
 
233
 * in_port set to OFPP_NONE.  Admittedly, doing this limits the recirculation
 
234
 * bridge from matching on in_port of post recirculation packets, and will be
 
235
 * fixed in the near future.
 
236
 *
 
237
 * TODO: Always restore the correct in_port.
 
238
 *
216
239
 */
217
240
 
 
241
struct ofproto_dpif *ofproto_dpif_recirc_get_ofproto(const struct dpif_backer *ofproto,
 
242
                                                     uint32_t recirc_id);
218
243
uint32_t ofproto_dpif_alloc_recirc_id(struct ofproto_dpif *ofproto);
219
244
void ofproto_dpif_free_recirc_id(struct ofproto_dpif *ofproto, uint32_t recirc_id);
220
245
int ofproto_dpif_add_internal_flow(struct ofproto_dpif *,
223
248
                                   struct rule **rulep);
224
249
int ofproto_dpif_delete_internal_flow(struct ofproto_dpif *, struct match *,
225
250
                                      int priority);
226
 
 
227
 
/* Number of implemented OpenFlow tables. */
228
 
enum { N_TABLES = 255 };
229
 
enum { TBL_INTERNAL = N_TABLES - 1 };    /* Used for internal hidden rules. */
230
 
BUILD_ASSERT_DECL(N_TABLES >= 2 && N_TABLES <= 255);
231
 
 
232
251
 
233
252
/* struct rule_dpif has struct rule as it's first member. */
234
253
#define RULE_CAST(RULE) ((struct rule *)RULE)