From 568671338801e98a141b753354e1235ab9736e9d Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 25 Sep 2013 13:26:06 +0900 Subject: [PATCH] packets: Remove unused function eth_mpls_depth eth_mpls_depth() has been unused as of 1ac7c9bdb2b6fdcb ("ofproto-dpif: Use execute_actions to execute controller actions"). Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- lib/packets.c | 26 -------------------------- lib/packets.h | 2 -- 2 files changed, 28 deletions(-) diff --git a/lib/packets.c b/lib/packets.c index 2bee709b7..922c5dba0 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -218,32 +218,6 @@ eth_pop_vlan(struct ofpbuf *packet) } } -/* Return depth of mpls stack. - * - * 'packet->l2_5' should initially point to 'packet''s outer-most MPLS header - * or may be NULL if there are no MPLS headers. */ -uint16_t -eth_mpls_depth(const struct ofpbuf *packet) -{ - struct mpls_hdr *mh = packet->l2_5; - uint16_t depth; - - if (!mh) { - return 0; - } - - depth = 0; - while (packet->size >= ((char *)mh - (char *)packet->data) + sizeof *mh) { - depth++; - if (mh->mpls_lse & htonl(MPLS_BOS_MASK)) { - break; - } - mh++; - } - - return depth; -} - /* Set ethertype of the packet. */ void set_ethertype(struct ofpbuf *packet, ovs_be16 eth_type) diff --git a/lib/packets.h b/lib/packets.h index b77691465..7388152d5 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -143,8 +143,6 @@ void compose_rarp(struct ofpbuf *, const uint8_t eth_src[ETH_ADDR_LEN]); void eth_push_vlan(struct ofpbuf *, ovs_be16 tci); void eth_pop_vlan(struct ofpbuf *); -uint16_t eth_mpls_depth(const struct ofpbuf *packet); - void set_ethertype(struct ofpbuf *packet, ovs_be16 eth_type); const char *eth_from_hex(const char *hex, struct ofpbuf **packetp); -- 2.47.0