From c75d4dcf957f617b40ca89546545f075e2631226 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 8 Jan 2011 16:00:41 -0800 Subject: [PATCH] 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 --- datapath/datapath.c | 2 +- include/openvswitch/datapath-protocol.h | 1 - lib/odp-util.h | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index d4d68112..95449f64 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 0aa6cd67..d76b5478 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 a7c0982a..1a0d58df 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) { -- 2.30.2