match: Add MATCH_CATCHALL_INITIALIZER.
authorBen Pfaff <blp@nicira.com>
Thu, 30 Apr 2015 06:49:00 +0000 (23:49 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 6 May 2015 00:21:05 +0000 (17:21 -0700)
An upcoming patch will add the first user.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
lib/match.h

index 6633304..638c49d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,6 +35,9 @@ struct match {
     struct flow_wildcards wc;
 };
 
+/* Initializer for a "struct match" that matches every packet. */
+#define MATCH_CATCHALL_INITIALIZER { .flow.dl_type = 0 }
+
 void match_init(struct match *,
                 const struct flow *, const struct flow_wildcards *);
 void match_wc_init(struct match *match, const struct flow *flow);