From: Ben Pfaff Date: Sun, 9 Jan 2011 00:00:41 +0000 (-0800) Subject: datapath: Get rid of ODPP_NONE. X-Git-Tag: v1.1.0~393 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c75d4dcf957f617b40ca89546545f075e2631226;p=sliver-openvswitch.git datapath: Get rid of ODPP_NONE. 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 Acked-by: Jesse Gross --- diff --git a/datapath/datapath.c b/datapath/datapath.c index d4d68112b..95449f643 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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; diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index 0aa6cd676..d76b54789 100644 --- a/include/openvswitch/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -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. */ diff --git a/lib/odp-util.h b/lib/odp-util.h index a7c0982a7..1a0d58df6 100644 --- a/lib/odp-util.h +++ b/lib/odp-util.h @@ -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) {