datapath: Get rid of ODPP_NONE.
authorBen Pfaff <blp@nicira.com>
Sun, 9 Jan 2011 00:00:41 +0000 (16:00 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 28 Jan 2011 05:08:40 +0000 (21:08 -0800)
This definition wasn't actually useful for the kernel--the only place that
it was used it didn't really have to be, so this commit removes it from
datapath-protocol.h.  It is still marginally useful in userspace, at least
as a value that converts to and from OpenFlow port number OFPP_NONE, so
move it to odp-util.c.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c
include/openvswitch/datapath-protocol.h
lib/odp-util.h

index d4d6811..95449f6 100644 (file)
@@ -296,7 +296,7 @@ void dp_process_received_packet(struct vport *p, struct sk_buff *skb)
                bool is_frag;
 
                /* Extract flow from 'skb' into 'key'. */
-               error = flow_extract(skb, p ? p->port_no : ODPP_NONE, &key, &is_frag);
+               error = flow_extract(skb, p->port_no, &key, &is_frag);
                if (unlikely(error)) {
                        kfree_skb(skb);
                        return;
index 0aa6cd6..d76b547 100644 (file)
@@ -137,7 +137,6 @@ struct odp_stats {
 
 /* Logical ports. */
 #define ODPP_LOCAL      ((uint16_t)0)
-#define ODPP_NONE       ((uint16_t)-1)
 
 /* Listening channels. */
 #define _ODPL_MISS_NR   0       /* Packet missed in flow table. */
index a7c0982..1a0d58d 100644 (file)
@@ -30,6 +30,8 @@ struct ds;
 struct flow;
 struct ofpbuf;
 
+#define ODPP_NONE ((uint16_t) -1)
+
 static inline uint16_t
 ofp_port_to_odp_port(uint16_t ofp_port)
 {