dp_packet is shorter, so I prefer it over current name.

Signed-off-by: Pravin B Shelar <pshe...@nicira.com>
---
 lib/automake.mk                    |    4 +-
 lib/{packet-dpif.c => dp-packet.c} |   24 ++++++------
 lib/{packet-dpif.h => dp-packet.h} |   16 ++++----
 lib/dpif-netdev.c                  |   70 ++++++++++++++++++------------------
 lib/dpif.c                         |    6 ++--
 lib/netdev-bsd.c                   |   16 ++++----
 lib/netdev-dpdk.c                  |   26 +++++++-------
 lib/netdev-dpdk.h                  |    6 ++--
 lib/netdev-dummy.c                 |   12 +++---
 lib/netdev-linux.c                 |   16 ++++----
 lib/netdev-provider.h              |    8 ++--
 lib/netdev-vport.c                 |   20 +++++-----
 lib/netdev.c                       |    8 ++--
 lib/netdev.h                       |   10 +++---
 lib/odp-execute.c                  |   22 ++++++------
 lib/odp-execute.h                  |    6 ++--
 lib/ofpbuf.c                       |    4 +-
 lib/ofpbuf.h                       |    4 +-
 lib/tnl-arp-cache.c                |    2 +-
 ofproto/ofproto-dpif-xlate.c       |    8 ++--
 20 files changed, 144 insertions(+), 144 deletions(-)
 rename lib/{packet-dpif.c => dp-packet.c} (74%)
 rename lib/{packet-dpif.h => dp-packet.h} (75%)

diff --git a/lib/automake.mk b/lib/automake.mk
index 2a5844b..87441f7 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -60,6 +60,8 @@ lib_libopenvswitch_la_SOURCES = \
        lib/dirs.h \
        lib/dpctl.c \
        lib/dpctl.h \
+       lib/dp-packet.h \
+       lib/dp-packet.c \
        lib/dpif-netdev.c \
        lib/dpif-netdev.h \
        lib/dpif-provider.h \
@@ -177,8 +179,6 @@ lib_libopenvswitch_la_SOURCES = \
        lib/ovsdb-parser.h \
        lib/ovsdb-types.c \
        lib/ovsdb-types.h \
-       lib/packet-dpif.c \
-       lib/packet-dpif.h \
        lib/packets.c \
        lib/packets.h \
        lib/pcap-file.c \
diff --git a/lib/packet-dpif.c b/lib/dp-packet.c
similarity index 74%
rename from lib/packet-dpif.c
rename to lib/dp-packet.c
index db739c5..d77f8e4 100644
--- a/lib/packet-dpif.c
+++ b/lib/dp-packet.c
@@ -15,14 +15,14 @@
  */
 
 #include <config.h>
-#include "packet-dpif.h"
+#include "dp-packet.h"
 
 #include "ofpbuf.h"
 
-struct dpif_packet *
-dpif_packet_new_with_headroom(size_t size, size_t headroom)
+struct dp_packet *
+dp_packet_new_with_headroom(size_t size, size_t headroom)
 {
-    struct dpif_packet *p = xmalloc(sizeof *p);
+    struct dp_packet *p = xmalloc(sizeof *p);
     struct ofpbuf *b = &p->ofpbuf;
 
     ofpbuf_init(b, size + headroom);
@@ -32,10 +32,10 @@ dpif_packet_new_with_headroom(size_t size, size_t headroom)
     return p;
 }
 
-struct dpif_packet *
-dpif_packet_clone_from_ofpbuf(const struct ofpbuf *b)
+struct dp_packet *
+dp_packet_clone_from_ofpbuf(const struct ofpbuf *b)
 {
-    struct dpif_packet *p = xmalloc(sizeof *p);
+    struct dp_packet *p = xmalloc(sizeof *p);
     size_t headroom = ofpbuf_headroom(b);
 
     ofpbuf_init(&p->ofpbuf, ofpbuf_size(b) + headroom);
@@ -57,15 +57,15 @@ dpif_packet_clone_from_ofpbuf(const struct ofpbuf *b)
     return p;
 }
 
-struct dpif_packet *
-dpif_packet_clone(struct dpif_packet *p)
+struct dp_packet *
+dp_packet_clone(struct dp_packet *p)
 {
-    struct dpif_packet *newp;
+    struct dp_packet *newp;
 
-    newp = dpif_packet_clone_from_ofpbuf(&p->ofpbuf);
+    newp = dp_packet_clone_from_ofpbuf(&p->ofpbuf);
     memcpy(&newp->md, &p->md, sizeof p->md);
 
-    dpif_packet_set_dp_hash(newp, dpif_packet_get_dp_hash(p));
+    dp_packet_set_dp_hash(newp, dp_packet_get_dp_hash(p));
 
     return newp;
 }
diff --git a/lib/packet-dpif.h b/lib/dp-packet.h
similarity index 75%
rename from lib/packet-dpif.h
rename to lib/dp-packet.h
index 1a5efb6..74abdec 100644
--- a/lib/packet-dpif.h
+++ b/lib/dp-packet.h
@@ -25,7 +25,7 @@ extern "C" {
 
 /* A packet received from a netdev and passed to a dpif. */
 
-struct dpif_packet {
+struct dp_packet {
     struct ofpbuf ofpbuf;       /* Packet data. */
 #ifndef DPDK_NETDEV
     uint32_t dp_hash;           /* Packet hash. */
@@ -33,21 +33,21 @@ struct dpif_packet {
     struct pkt_metadata md;
 };
 
-struct dpif_packet *dpif_packet_new_with_headroom(size_t size,
+struct dp_packet *dp_packet_new_with_headroom(size_t size,
                                                   size_t headroom);
 
-struct dpif_packet *dpif_packet_clone_from_ofpbuf(const struct ofpbuf *b);
+struct dp_packet *dp_packet_clone_from_ofpbuf(const struct ofpbuf *b);
 
-struct dpif_packet *dpif_packet_clone(struct dpif_packet *p);
+struct dp_packet *dp_packet_clone(struct dp_packet *p);
 
-static inline void dpif_packet_delete(struct dpif_packet *p)
+static inline void dp_packet_delete(struct dp_packet *p)
 {
     struct ofpbuf *buf = &p->ofpbuf;
 
     ofpbuf_delete(buf);
 }
 
-static inline uint32_t dpif_packet_get_dp_hash(struct dpif_packet *p)
+static inline uint32_t dp_packet_get_dp_hash(struct dp_packet *p)
 {
 #ifdef DPDK_NETDEV
     return p->ofpbuf.mbuf.pkt.hash.rss;
@@ -56,7 +56,7 @@ static inline uint32_t dpif_packet_get_dp_hash(struct 
dpif_packet *p)
 #endif
 }
 
-static inline void dpif_packet_set_dp_hash(struct dpif_packet *p,
+static inline void dp_packet_set_dp_hash(struct dp_packet *p,
                                            uint32_t hash)
 {
 #ifdef DPDK_NETDEV
@@ -70,4 +70,4 @@ static inline void dpif_packet_set_dp_hash(struct dpif_packet 
*p,
 }
 #endif
 
-#endif /* packet-dpif.h */
+#endif /* dp-packet.h */
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 54bad02..70ef97b 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -33,6 +33,7 @@
 
 #include "cmap.h"
 #include "csum.h"
+#include "dp-packet.h"
 #include "dpif.h"
 #include "dpif-provider.h"
 #include "dummy.h"
@@ -54,7 +55,6 @@
 #include "ofpbuf.h"
 #include "ovs-numa.h"
 #include "ovs-rcu.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "poll-loop.h"
 #include "pvector.h"
@@ -415,12 +415,12 @@ static void do_del_port(struct dp_netdev *dp, struct 
dp_netdev_port *)
 static int dpif_netdev_open(const struct dpif_class *, const char *name,
                             bool create, struct dpif **);
 static void dp_netdev_execute_actions(struct dp_netdev_pmd_thread *pmd,
-                                      struct dpif_packet **, int c,
+                                      struct dp_packet **, int c,
                                       bool may_steal,
                                       const struct nlattr *actions,
                                       size_t actions_len);
 static void dp_netdev_input(struct dp_netdev_pmd_thread *,
-                            struct dpif_packet **, int cnt);
+                            struct dp_packet **, int cnt);
 
 static void dp_netdev_disable_upcall(struct dp_netdev *);
 void dp_netdev_pmd_reload_done(struct dp_netdev_pmd_thread *pmd);
@@ -2046,7 +2046,7 @@ dpif_netdev_execute(struct dpif *dpif, struct 
dpif_execute *execute)
 {
     struct dp_netdev *dp = get_dp_netdev(dpif);
     struct dp_netdev_pmd_thread *pmd;
-    struct dpif_packet packet, *pp;
+    struct dp_packet packet, *pp;
 
     if (ofpbuf_size(execute->packet) < ETH_HEADER_LEN ||
         ofpbuf_size(execute->packet) > UINT16_MAX) {
@@ -2230,7 +2230,7 @@ dp_netdev_process_rxq_port(struct dp_netdev_pmd_thread 
*pmd,
                            struct dp_netdev_port *port,
                            struct netdev_rxq *rxq)
 {
-    struct dpif_packet *packets[NETDEV_MAX_RX_BATCH];
+    struct dp_packet *packets[NETDEV_MAX_RX_BATCH];
     int error, cnt;
 
     error = netdev_rxq_recv(rxq, packets, &cnt);
@@ -2693,7 +2693,7 @@ dp_netdev_count_packet(struct dp_netdev_pmd_thread *pmd,
 }
 
 static int
-dp_netdev_upcall(struct dp_netdev_pmd_thread *pmd, struct dpif_packet *packet_,
+dp_netdev_upcall(struct dp_netdev_pmd_thread *pmd, struct dp_packet *packet_,
                  struct flow *flow, struct flow_wildcards *wc, ovs_u128 *ufid,
                  enum dpif_upcall_type type, const struct nlattr *userdata,
                  struct ofpbuf *actions, struct ofpbuf *put_actions)
@@ -2736,15 +2736,15 @@ dp_netdev_upcall(struct dp_netdev_pmd_thread *pmd, 
struct dpif_packet *packet_,
 }
 
 static inline uint32_t
-dpif_netdev_packet_get_dp_hash(struct dpif_packet *packet,
+dpif_netdev_packet_get_dp_hash(struct dp_packet *packet,
                                const struct miniflow *mf)
 {
     uint32_t hash;
 
-    hash = dpif_packet_get_dp_hash(packet);
+    hash = dp_packet_get_dp_hash(packet);
     if (OVS_UNLIKELY(!hash)) {
         hash = miniflow_hash_5tuple(mf, 0);
-        dpif_packet_set_dp_hash(packet, hash);
+        dp_packet_set_dp_hash(packet, hash);
     }
     return hash;
 }
@@ -2756,11 +2756,11 @@ struct packet_batch {
 
     struct dp_netdev_flow *flow;
 
-    struct dpif_packet *packets[NETDEV_MAX_RX_BATCH];
+    struct dp_packet *packets[NETDEV_MAX_RX_BATCH];
 };
 
 static inline void
-packet_batch_update(struct packet_batch *batch, struct dpif_packet *packet,
+packet_batch_update(struct packet_batch *batch, struct dp_packet *packet,
                     const struct miniflow *mf)
 {
     batch->tcp_flags |= miniflow_get_tcp_flags(mf);
@@ -2797,7 +2797,7 @@ packet_batch_execute(struct packet_batch *batch,
 }
 
 static inline bool
-dp_netdev_queue_batches(struct dpif_packet *pkt,
+dp_netdev_queue_batches(struct dp_packet *pkt,
                         struct dp_netdev_flow *flow, const struct miniflow *mf,
                         struct packet_batch *batches, size_t *n_batches,
                         size_t max_batches)
@@ -2832,9 +2832,9 @@ dp_netdev_queue_batches(struct dpif_packet *pkt,
 }
 
 static inline void
-dpif_packet_swap(struct dpif_packet **a, struct dpif_packet **b)
+dp_packet_swap(struct dp_packet **a, struct dp_packet **b)
 {
-    struct dpif_packet *tmp = *a;
+    struct dp_packet *tmp = *a;
     *a = *b;
     *b = tmp;
 }
@@ -2848,7 +2848,7 @@ dpif_packet_swap(struct dpif_packet **a, struct 
dpif_packet **b)
  * 'packets' array (they have been moved to the beginning of the vector).
  */
 static inline size_t
-emc_processing(struct dp_netdev_pmd_thread *pmd, struct dpif_packet **packets,
+emc_processing(struct dp_netdev_pmd_thread *pmd, struct dp_packet **packets,
                size_t cnt, struct netdev_flow_key *keys)
 {
     struct netdev_flow_key key;
@@ -2863,7 +2863,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, struct 
dpif_packet **packets,
         struct dp_netdev_flow *flow;
 
         if (OVS_UNLIKELY(ofpbuf_size(&packets[i]->ofpbuf) < ETH_HEADER_LEN)) {
-            dpif_packet_delete(packets[i]);
+            dp_packet_delete(packets[i]);
             continue;
         }
 
@@ -2876,7 +2876,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, struct 
dpif_packet **packets,
                                                   batches, &n_batches,
                                                   ARRAY_SIZE(batches)))) {
             if (i != notfound_cnt) {
-                dpif_packet_swap(&packets[i], &packets[notfound_cnt]);
+                dp_packet_swap(&packets[i], &packets[notfound_cnt]);
             }
 
             keys[notfound_cnt++] = key;
@@ -2892,7 +2892,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, struct 
dpif_packet **packets,
 
 static inline void
 fast_path_processing(struct dp_netdev_pmd_thread *pmd,
-                     struct dpif_packet **packets, size_t cnt,
+                     struct dp_packet **packets, size_t cnt,
                      struct netdev_flow_key *keys)
 {
 #if !defined(__CHECKER__) && !defined(_WIN32)
@@ -2992,7 +2992,7 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,
 
         for (i = 0; i < cnt; i++) {
             if (OVS_UNLIKELY(!rules[i])) {
-                dpif_packet_delete(packets[i]);
+                dp_packet_delete(packets[i]);
                 dropped_cnt++;
             }
         }
@@ -3002,7 +3002,7 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,
 
     n_batches = 0;
     for (i = 0; i < cnt; i++) {
-        struct dpif_packet *packet = packets[i];
+        struct dp_packet *packet = packets[i];
         struct dp_netdev_flow *flow;
 
         if (OVS_UNLIKELY(!rules[i])) {
@@ -3023,7 +3023,7 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,
 
 static void
 dp_netdev_input(struct dp_netdev_pmd_thread *pmd,
-                struct dpif_packet **packets, int cnt)
+                struct dp_packet **packets, int cnt)
 {
 #if !defined(__CHECKER__) && !defined(_WIN32)
     const size_t PKT_ARRAY_SIZE = cnt;
@@ -3054,13 +3054,13 @@ dpif_netdev_register_upcall_cb(struct dpif *dpif, 
upcall_callback *cb,
 }
 
 static void
-dp_netdev_drop_packets(struct dpif_packet ** packets, int cnt, bool may_steal)
+dp_netdev_drop_packets(struct dp_packet ** packets, int cnt, bool may_steal)
 {
     if (may_steal) {
         int i;
 
         for (i = 0; i < cnt; i++) {
-            dpif_packet_delete(packets[i]);
+            dp_packet_delete(packets[i]);
         }
     }
 }
@@ -3068,7 +3068,7 @@ dp_netdev_drop_packets(struct dpif_packet ** packets, int 
cnt, bool may_steal)
 static int
 push_tnl_action(const struct dp_netdev *dp,
                    const struct nlattr *attr,
-                   struct dpif_packet **packets, int cnt)
+                   struct dp_packet **packets, int cnt)
 {
     struct dp_netdev_port *tun_port;
     const struct ovs_action_push_tnl *data;
@@ -3085,18 +3085,18 @@ push_tnl_action(const struct dp_netdev *dp,
 }
 
 static void
-dp_netdev_clone_pkt_batch(struct dpif_packet **tnl_pkt,
-                          struct dpif_packet **packets, int cnt)
+dp_netdev_clone_pkt_batch(struct dp_packet **tnl_pkt,
+                          struct dp_packet **packets, int cnt)
 {
     int i;
 
     for (i = 0; i < cnt; i++) {
-        tnl_pkt[i] = dpif_packet_clone(packets[i]);
+        tnl_pkt[i] = dp_packet_clone(packets[i]);
     }
 }
 
 static void
-dp_execute_cb(void *aux_, struct dpif_packet **packets, int cnt,
+dp_execute_cb(void *aux_, struct dp_packet **packets, int cnt,
               const struct nlattr *a, bool may_steal)
     OVS_NO_THREAD_SAFETY_ANALYSIS
 {
@@ -3119,7 +3119,7 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, 
int cnt,
 
     case OVS_ACTION_ATTR_TUNNEL_PUSH:
         if (*depth < MAX_RECIRC_DEPTH) {
-            struct dpif_packet *tnl_pkt[NETDEV_MAX_RX_BATCH];
+            struct dp_packet *tnl_pkt[NETDEV_MAX_RX_BATCH];
             int err;
 
             if (!may_steal) {
@@ -3145,7 +3145,7 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, 
int cnt,
 
             p = dp_netdev_lookup_port(dp, portno);
             if (p) {
-                struct dpif_packet *tnl_pkt[NETDEV_MAX_RX_BATCH];
+                struct dp_packet *tnl_pkt[NETDEV_MAX_RX_BATCH];
                 int err;
 
                 if (!may_steal) {
@@ -3196,7 +3196,7 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, 
int cnt,
                                               ofpbuf_data(&actions),
                                               ofpbuf_size(&actions));
                 } else if (may_steal) {
-                    dpif_packet_delete(packets[i]);
+                    dp_packet_delete(packets[i]);
                 }
             }
             ofpbuf_uninit(&actions);
@@ -3211,15 +3211,15 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, 
int cnt,
 
             (*depth)++;
             for (i = 0; i < cnt; i++) {
-                struct dpif_packet *recirc_pkt;
+                struct dp_packet *recirc_pkt;
 
                 recirc_pkt = (may_steal) ? packets[i]
-                                    : dpif_packet_clone(packets[i]);
+                                    : dp_packet_clone(packets[i]);
 
                 recirc_pkt->md.recirc_id = nl_attr_get_u32(a);
 
                 /* Hash is private to each packet */
-                recirc_pkt->md.dp_hash = dpif_packet_get_dp_hash(packets[i]);
+                recirc_pkt->md.dp_hash = dp_packet_get_dp_hash(packets[i]);
 
                 dp_netdev_input(pmd, &recirc_pkt, 1);
             }
@@ -3249,7 +3249,7 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, 
int cnt,
 
 static void
 dp_netdev_execute_actions(struct dp_netdev_pmd_thread *pmd,
-                          struct dpif_packet **packets, int cnt,
+                          struct dp_packet **packets, int cnt,
                           bool may_steal,
                           const struct nlattr *actions, size_t actions_len)
 {
diff --git a/lib/dpif.c b/lib/dpif.c
index 6ecd1d9..44cd54a 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -25,6 +25,7 @@
 
 #include "coverage.h"
 #include "dpctl.h"
+#include "dp-packet.h"
 #include "dynamic-string.h"
 #include "flow.h"
 #include "netdev.h"
@@ -35,7 +36,6 @@
 #include "ofp-print.h"
 #include "ofp-util.h"
 #include "ofpbuf.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "poll-loop.h"
 #include "route-table.h"
@@ -1075,7 +1075,7 @@ struct dpif_execute_helper_aux {
 /* This is called for actions that need the context of the datapath to be
  * meaningful. */
 static void
-dpif_execute_helper_cb(void *aux_, struct dpif_packet **packets, int cnt,
+dpif_execute_helper_cb(void *aux_, struct dp_packet **packets, int cnt,
                        const struct nlattr *action, bool may_steal OVS_UNUSED)
 {
     struct dpif_execute_helper_aux *aux = aux_;
@@ -1146,7 +1146,7 @@ static int
 dpif_execute_with_help(struct dpif *dpif, struct dpif_execute *execute)
 {
     struct dpif_execute_helper_aux aux = {dpif, 0};
-    struct dpif_packet packet, *pp;
+    struct dp_packet packet, *pp;
 
     COVERAGE_INC(dpif_execute_with_help);
 
diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index 00e8bcd..36a2642 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -48,13 +48,13 @@
 
 #include "rtbsd.h"
 #include "coverage.h"
+#include "dp-packet.h"
 #include "dpif-netdev.h"
 #include "dynamic-string.h"
 #include "fatal-signal.h"
 #include "ofpbuf.h"
 #include "openflow/openflow.h"
 #include "ovs-thread.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "poll-loop.h"
 #include "shash.h"
@@ -621,12 +621,12 @@ netdev_rxq_bsd_recv_tap(struct netdev_rxq_bsd *rxq, 
struct ofpbuf *buffer)
 }
 
 static int
-netdev_bsd_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
+netdev_bsd_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
                     int *c)
 {
     struct netdev_rxq_bsd *rxq = netdev_rxq_bsd_cast(rxq_);
     struct netdev *netdev = rxq->up.netdev;
-    struct dpif_packet *packet;
+    struct dp_packet *packet;
     struct ofpbuf *buffer;
     ssize_t retval;
     int mtu;
@@ -635,7 +635,7 @@ netdev_bsd_rxq_recv(struct netdev_rxq *rxq_, struct 
dpif_packet **packets,
         mtu = ETH_PAYLOAD_MAX;
     }
 
-    packet = dpif_packet_new_with_headroom(VLAN_ETH_HEADER_LEN + mtu,
+    packet = dp_packet_new_with_headroom(VLAN_ETH_HEADER_LEN + mtu,
                                            DP_NETDEV_HEADROOM);
     buffer = &packet->ofpbuf;
 
@@ -644,10 +644,10 @@ netdev_bsd_rxq_recv(struct netdev_rxq *rxq_, struct 
dpif_packet **packets,
             : netdev_rxq_bsd_recv_tap(rxq, buffer));
 
     if (retval) {
-        dpif_packet_delete(packet);
+        dp_packet_delete(packet);
     } else {
         dp_packet_pad(buffer);
-        dpif_packet_set_dp_hash(packet, 0);
+        dp_packet_set_dp_hash(packet, 0);
         packets[0] = packet;
         *c = 1;
     }
@@ -688,7 +688,7 @@ netdev_bsd_rxq_drain(struct netdev_rxq *rxq_)
  */
 static int
 netdev_bsd_send(struct netdev *netdev_, int qid OVS_UNUSED,
-                struct dpif_packet **pkts, int cnt, bool may_steal)
+                struct dp_packet **pkts, int cnt, bool may_steal)
 {
     struct netdev_bsd *dev = netdev_bsd_cast(netdev_);
     const char *name = netdev_get_name(netdev_);
@@ -737,7 +737,7 @@ netdev_bsd_send(struct netdev *netdev_, int qid OVS_UNUSED,
     ovs_mutex_unlock(&dev->mutex);
     if (may_steal) {
         for (i = 0; i < cnt; i++) {
-            dpif_packet_delete(pkts[i]);
+            dp_packet_delete(pkts[i]);
         }
     }
 
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index aea2016..34dd706 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <stdio.h>
 
+#include "dp-packet.h"
 #include "dpif-netdev.h"
 #include "list.h"
 #include "netdev-dpdk.h"
@@ -39,7 +40,6 @@
 #include "ovs-numa.h"
 #include "ovs-thread.h"
 #include "ovs-rcu.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "shash.h"
 #include "sset.h"
@@ -238,7 +238,7 @@ dpdk_rte_mzalloc(size_t sz)
 /* XXX this function should be called only by pmd threads (or by non pmd
  * threads holding the nonpmd_mempool_mutex) */
 void
-free_dpdk_buf(struct dpif_packet *p)
+free_dpdk_buf(struct dp_packet *p)
 {
     struct rte_mbuf *pkt = (struct rte_mbuf *) p;
 
@@ -252,16 +252,16 @@ __rte_pktmbuf_init(struct rte_mempool *mp,
                    unsigned i OVS_UNUSED)
 {
     struct rte_mbuf *m = _m;
-    uint32_t buf_len = mp->elt_size - sizeof(struct dpif_packet);
+    uint32_t buf_len = mp->elt_size - sizeof(struct dp_packet);
 
-    RTE_MBUF_ASSERT(mp->elt_size >= sizeof(struct dpif_packet));
+    RTE_MBUF_ASSERT(mp->elt_size >= sizeof(struct dp_packet));
 
     memset(m, 0, mp->elt_size);
 
     /* start of buffer is just after mbuf structure */
-    m->buf_addr = (char *)m + sizeof(struct dpif_packet);
+    m->buf_addr = (char *)m + sizeof(struct dp_packet);
     m->buf_physaddr = rte_mempool_virt2phy(mp, m) +
-                    sizeof(struct dpif_packet);
+                    sizeof(struct dp_packet);
     m->buf_len = (uint16_t)buf_len;
 
     /* keep some headroom between start of buffer and data */
@@ -731,7 +731,7 @@ dpdk_queue_flush(struct netdev_dpdk *dev, int qid)
 }
 
 static int
-netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
+netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
                      int *c)
 {
     struct netdev_rxq_dpdk *rx = netdev_rxq_dpdk_cast(rxq_);
@@ -789,7 +789,7 @@ dpdk_queue_pkts(struct netdev_dpdk *dev, int qid,
 
 /* Tx function. Transmit packets indefinitely */
 static void
-dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dpif_packet ** pkts,
+dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dp_packet ** pkts,
                 int cnt)
     OVS_NO_THREAD_SAFETY_ANALYSIS
 {
@@ -849,7 +849,7 @@ dpdk_do_tx_copy(struct netdev *netdev, int qid, struct 
dpif_packet ** pkts,
 
 static inline void
 netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
-                   struct dpif_packet **pkts, int cnt, bool may_steal)
+                   struct dp_packet **pkts, int cnt, bool may_steal)
 {
     int i;
 
@@ -861,7 +861,7 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
 
         if (may_steal) {
             for (i = 0; i < cnt; i++) {
-                dpif_packet_delete(pkts[i]);
+                dp_packet_delete(pkts[i]);
             }
         }
     } else {
@@ -880,7 +880,7 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
                 VLOG_WARN_RL(&rl, "Too big size %d max_packet_len %d",
                              (int)size , dev->max_packet_len);
 
-                dpif_packet_delete(pkts[i]);
+                dp_packet_delete(pkts[i]);
                 dropped++;
                 next_tx_idx = i + 1;
             }
@@ -901,7 +901,7 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
 
 static int
 netdev_dpdk_eth_send(struct netdev *netdev, int qid,
-                     struct dpif_packet **pkts, int cnt, bool may_steal)
+                     struct dp_packet **pkts, int cnt, bool may_steal)
 {
     struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
 
@@ -1371,7 +1371,7 @@ dpdk_ring_open(const char dev_name[], unsigned int 
*eth_port_id) OVS_REQUIRES(dp
 
 static int
 netdev_dpdk_ring_send(struct netdev *netdev, int qid OVS_UNUSED,
-                      struct dpif_packet **pkts, int cnt, bool may_steal)
+                      struct dp_packet **pkts, int cnt, bool may_steal)
 {
     struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
 
diff --git a/lib/netdev-dpdk.h b/lib/netdev-dpdk.h
index 694899c..d3840f9 100644
--- a/lib/netdev-dpdk.h
+++ b/lib/netdev-dpdk.h
@@ -3,7 +3,7 @@
 
 #include <config.h>
 
-struct dpif_packet;
+struct dp_packet;
 
 /* Reserves cpu core 0 for all non-pmd threads.  Changing the value of this
  * macro will allow pmd thread to be pinned on cpu core 0.  This may not be
@@ -27,7 +27,7 @@ struct dpif_packet;
 
 int dpdk_init(int argc, char **argv);
 void netdev_dpdk_register(void);
-void free_dpdk_buf(struct dpif_packet *);
+void free_dpdk_buf(struct dp_packet *);
 int pmd_thread_setaffinity_cpu(int cpu);
 void thread_set_nonpmd(void);
 
@@ -51,7 +51,7 @@ netdev_dpdk_register(void)
 }
 
 static inline void
-free_dpdk_buf(struct dpif_packet *buf OVS_UNUSED)
+free_dpdk_buf(struct dp_packet *buf OVS_UNUSED)
 {
     /* Nothing */
 }
diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
index fcb0b77..5abac31 100644
--- a/lib/netdev-dummy.c
+++ b/lib/netdev-dummy.c
@@ -20,6 +20,7 @@
 
 #include <errno.h>
 
+#include "dp-packet.h"
 #include "dpif-netdev.h"
 #include "dynamic-string.h"
 #include "flow.h"
@@ -29,7 +30,6 @@
 #include "odp-util.h"
 #include "ofp-print.h"
 #include "ofpbuf.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "pcap-file.h"
 #include "poll-loop.h"
@@ -808,7 +808,7 @@ netdev_dummy_rxq_dealloc(struct netdev_rxq *rxq_)
 }
 
 static int
-netdev_dummy_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **arr,
+netdev_dummy_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **arr,
                       int *c)
 {
     struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
@@ -835,8 +835,8 @@ netdev_dummy_rxq_recv(struct netdev_rxq *rxq_, struct 
dpif_packet **arr,
     dp_packet_pad(packet);
 
     /* This performs a (sometimes unnecessary) copy */
-    arr[0] = dpif_packet_clone_from_ofpbuf(packet);
-    dpif_packet_set_dp_hash(arr[0], 0);
+    arr[0] = dp_packet_clone_from_ofpbuf(packet);
+    dp_packet_set_dp_hash(arr[0], 0);
     ofpbuf_delete(packet);
     *c = 1;
     return 0;
@@ -876,7 +876,7 @@ netdev_dummy_rxq_drain(struct netdev_rxq *rxq_)
 
 static int
 netdev_dummy_send(struct netdev *netdev, int qid OVS_UNUSED,
-                  struct dpif_packet **pkts, int cnt, bool may_steal)
+                  struct dp_packet **pkts, int cnt, bool may_steal)
 {
     struct netdev_dummy *dev = netdev_dummy_cast(netdev);
     int error = 0;
@@ -925,7 +925,7 @@ netdev_dummy_send(struct netdev *netdev, int qid OVS_UNUSED,
 
     if (may_steal) {
         for (i = 0; i < cnt; i++) {
-            dpif_packet_delete(pkts[i]);
+            dp_packet_delete(pkts[i]);
         }
     }
 
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index a1e4979..2b7ceaf 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -48,6 +48,7 @@
 #include <unistd.h>
 
 #include "coverage.h"
+#include "dp-packet.h"
 #include "dpif-netlink.h"
 #include "dpif-netdev.h"
 #include "dynamic-string.h"
@@ -62,7 +63,6 @@
 #include "ofpbuf.h"
 #include "openflow/openflow.h"
 #include "ovs-atomic.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "poll-loop.h"
 #include "rtnetlink-link.h"
@@ -1024,12 +1024,12 @@ netdev_linux_rxq_recv_tap(int fd, struct ofpbuf *buffer)
 }
 
 static int
-netdev_linux_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
+netdev_linux_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
                       int *c)
 {
     struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
     struct netdev *netdev = rx->up.netdev;
-    struct dpif_packet *packet;
+    struct dp_packet *packet;
     struct ofpbuf *buffer;
     ssize_t retval;
     int mtu;
@@ -1038,7 +1038,7 @@ netdev_linux_rxq_recv(struct netdev_rxq *rxq_, struct 
dpif_packet **packets,
         mtu = ETH_PAYLOAD_MAX;
     }
 
-    packet = dpif_packet_new_with_headroom(VLAN_ETH_HEADER_LEN + mtu,
+    packet = dp_packet_new_with_headroom(VLAN_ETH_HEADER_LEN + mtu,
                                            DP_NETDEV_HEADROOM);
     buffer = &packet->ofpbuf;
 
@@ -1051,10 +1051,10 @@ netdev_linux_rxq_recv(struct netdev_rxq *rxq_, struct 
dpif_packet **packets,
             VLOG_WARN_RL(&rl, "error receiving Ethernet packet on %s: %s",
                          ovs_strerror(errno), netdev_rxq_get_name(rxq_));
         }
-        dpif_packet_delete(packet);
+        dp_packet_delete(packet);
     } else {
         dp_packet_pad(buffer);
-        dpif_packet_set_dp_hash(packet, 0);
+        dp_packet_set_dp_hash(packet, 0);
         packets[0] = packet;
         *c = 1;
     }
@@ -1098,7 +1098,7 @@ netdev_linux_rxq_drain(struct netdev_rxq *rxq_)
  * expected to do additional queuing of packets. */
 static int
 netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED,
-                  struct dpif_packet **pkts, int cnt, bool may_steal)
+                  struct dp_packet **pkts, int cnt, bool may_steal)
 {
     int i;
     int error = 0;
@@ -1180,7 +1180,7 @@ netdev_linux_send(struct netdev *netdev_, int qid 
OVS_UNUSED,
 
     if (may_steal) {
         for (i = 0; i < cnt; i++) {
-            dpif_packet_delete(pkts[i]);
+            dp_packet_delete(pkts[i]);
         }
     }
 
diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h
index e0b76fc..915e54a 100644
--- a/lib/netdev-provider.h
+++ b/lib/netdev-provider.h
@@ -264,13 +264,13 @@ struct netdev_class {
      * a packet on actual transmit.  It uses partial header build by
      * build_header() which is passed as data. */
     int (*push_header)(const struct netdev *netdev,
-                       struct dpif_packet **buffers, int cnt,
+                       struct dp_packet **buffers, int cnt,
                        const struct ovs_action_push_tnl *data);
 
     /* Pop tunnel header from packet, build tunnel metadata and resize packet
      * for further processing. */
     int  (*pop_header)(struct netdev *netdev,
-                       struct dpif_packet **buffers, int cnt);
+                       struct dp_packet **buffers, int cnt);
 
     /* Returns the id of the numa node the 'netdev' is on.  If there is no
      * such info, returns NETDEV_NUMA_UNSPEC. */
@@ -309,7 +309,7 @@ struct netdev_class {
      * network device from being usefully used by the netdev-based "userspace
      * datapath".  It will also prevent the OVS implementation of bonding from
      * working properly over 'netdev'.) */
-    int (*send)(struct netdev *netdev, int qid, struct dpif_packet **buffers,
+    int (*send)(struct netdev *netdev, int qid, struct dp_packet **buffers,
                 int cnt, bool may_steal);
 
     /* Registers with the poll loop to wake up from the next call to
@@ -710,7 +710,7 @@ struct netdev_class {
      * Caller is expected to pass array of size MAX_RX_BATCH.
      * This function may be set to null if it would always return EOPNOTSUPP
      * anyhow. */
-    int (*rxq_recv)(struct netdev_rxq *rx, struct dpif_packet **pkts,
+    int (*rxq_recv)(struct netdev_rxq *rx, struct dp_packet **pkts,
                     int *cnt);
 
     /* Registers with the poll loop to wake up from the next call to
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 9d02f2f..34874a9 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -29,6 +29,7 @@
 #include "daemon.h"
 #include "dirs.h"
 #include "dpif.h"
+#include "dp-packet.h"
 #include "dynamic-string.h"
 #include "flow.h"
 #include "hash.h"
@@ -39,7 +40,6 @@
 #include "ofpbuf.h"
 #include "ovs-router.h"
 #include "packets.h"
-#include "packet-dpif.h"
 #include "poll-loop.h"
 #include "route-table.h"
 #include "shash.h"
@@ -944,7 +944,7 @@ reset_tnl_md(struct pkt_metadata *md)
 }
 
 static void
-gre_extract_md(struct dpif_packet *dpif_pkt)
+gre_extract_md(struct dp_packet *dpif_pkt)
 {
     struct ofpbuf *packet = &dpif_pkt->ofpbuf;
     struct pkt_metadata *md = &dpif_pkt->md;
@@ -967,7 +967,7 @@ gre_extract_md(struct dpif_packet *dpif_pkt)
 
 static int
 netdev_gre_pop_header(struct netdev *netdev_ OVS_UNUSED,
-                      struct dpif_packet **pkt, int cnt)
+                      struct dp_packet **pkt, int cnt)
 {
     int i;
 
@@ -996,7 +996,7 @@ netdev_gre_push_header__(struct ofpbuf *packet,
 
 static int
 netdev_gre_push_header(const struct netdev *netdev OVS_UNUSED,
-                       struct dpif_packet **packets, int cnt,
+                       struct dp_packet **packets, int cnt,
                        const struct ovs_action_push_tnl *data)
 {
     int i;
@@ -1057,7 +1057,7 @@ netdev_gre_build_header(const struct netdev *netdev,
 }
 
 static void
-vxlan_extract_md(struct dpif_packet *dpif_pkt)
+vxlan_extract_md(struct dp_packet *dpif_pkt)
 {
     struct ofpbuf *packet = &dpif_pkt->ofpbuf;
     struct pkt_metadata *md = &dpif_pkt->md;
@@ -1093,7 +1093,7 @@ vxlan_extract_md(struct dpif_packet *dpif_pkt)
 
 static int
 netdev_vxlan_pop_header(struct netdev *netdev_ OVS_UNUSED,
-                        struct dpif_packet **pkt, int cnt)
+                        struct dp_packet **pkt, int cnt)
 {
     int i;
 
@@ -1134,18 +1134,18 @@ netdev_vxlan_build_header(const struct netdev *netdev,
 }
 
 static ovs_be16
-get_src_port(struct dpif_packet *packet)
+get_src_port(struct dp_packet *packet)
 {
     uint32_t hash;
 
-    hash = dpif_packet_get_dp_hash(packet);
+    hash = dp_packet_get_dp_hash(packet);
 
     return htons((((uint64_t) hash * (tnl_udp_port_max - tnl_udp_port_min)) >> 
32) +
                  tnl_udp_port_min);
 }
 
 static void
-netdev_vxlan_push_header__(struct dpif_packet *packet,
+netdev_vxlan_push_header__(struct dp_packet *packet,
                            const void *header, int size)
 {
     struct udp_header *udp;
@@ -1161,7 +1161,7 @@ netdev_vxlan_push_header__(struct dpif_packet *packet,
 
 static int
 netdev_vxlan_push_header(const struct netdev *netdev OVS_UNUSED,
-                         struct dpif_packet **packets, int cnt,
+                         struct dp_packet **packets, int cnt,
                          const struct ovs_action_push_tnl *data)
 {
     int i;
diff --git a/lib/netdev.c b/lib/netdev.c
index 2bda77f..cfd979a 100644
--- a/lib/netdev.c
+++ b/lib/netdev.c
@@ -641,7 +641,7 @@ netdev_rxq_close(struct netdev_rxq *rx)
  * This function may be set to null if it would always return EOPNOTSUPP
  * anyhow. */
 int
-netdev_rxq_recv(struct netdev_rxq *rx, struct dpif_packet **buffers, int *cnt)
+netdev_rxq_recv(struct netdev_rxq *rx, struct dp_packet **buffers, int *cnt)
 {
     int retval;
 
@@ -716,7 +716,7 @@ netdev_set_multiq(struct netdev *netdev, unsigned int n_txq,
  * Some network devices may not implement support for this function.  In such
  * cases this function will always return EOPNOTSUPP. */
 int
-netdev_send(struct netdev *netdev, int qid, struct dpif_packet **buffers,
+netdev_send(struct netdev *netdev, int qid, struct dp_packet **buffers,
             int cnt, bool may_steal)
 {
     int error;
@@ -731,7 +731,7 @@ netdev_send(struct netdev *netdev, int qid, struct 
dpif_packet **buffers,
 }
 
 int
-netdev_pop_header(struct netdev *netdev, struct dpif_packet **buffers, int cnt)
+netdev_pop_header(struct netdev *netdev, struct dp_packet **buffers, int cnt)
 {
     return (netdev->netdev_class->pop_header
              ? netdev->netdev_class->pop_header(netdev, buffers, cnt)
@@ -749,7 +749,7 @@ netdev_build_header(const struct netdev *netdev, struct 
ovs_action_push_tnl *dat
 
 int
 netdev_push_header(const struct netdev *netdev,
-                   struct dpif_packet **buffers, int cnt,
+                   struct dp_packet **buffers, int cnt,
                    const struct ovs_action_push_tnl *data)
 {
     if (netdev->netdev_class->push_header) {
diff --git a/lib/netdev.h b/lib/netdev.h
index 33f301a..9a647f0 100644
--- a/lib/netdev.h
+++ b/lib/netdev.h
@@ -60,7 +60,7 @@ extern "C" {
  *      netdev and access each of those from a different thread.)
  */
 
-struct dpif_packet;
+struct dp_packet;
 struct netdev;
 struct netdev_class;
 struct netdev_rxq;
@@ -174,21 +174,21 @@ void netdev_rxq_close(struct netdev_rxq *);
 
 const char *netdev_rxq_get_name(const struct netdev_rxq *);
 
-int netdev_rxq_recv(struct netdev_rxq *rx, struct dpif_packet **buffers,
+int netdev_rxq_recv(struct netdev_rxq *rx, struct dp_packet **buffers,
                     int *cnt);
 void netdev_rxq_wait(struct netdev_rxq *);
 int netdev_rxq_drain(struct netdev_rxq *);
 
 /* Packet transmission. */
-int netdev_send(struct netdev *, int qid, struct dpif_packet **, int cnt,
+int netdev_send(struct netdev *, int qid, struct dp_packet **, int cnt,
                 bool may_steal);
 void netdev_send_wait(struct netdev *, int qid);
 
 int netdev_build_header(const struct netdev *, struct ovs_action_push_tnl 
*data);
 int netdev_push_header(const struct netdev *netdev,
-                       struct dpif_packet **buffers, int cnt,
+                       struct dp_packet **buffers, int cnt,
                        const struct ovs_action_push_tnl *data);
-int netdev_pop_header(struct netdev *netdev, struct dpif_packet **buffers,
+int netdev_pop_header(struct netdev *netdev, struct dp_packet **buffers,
                       int cnt);
 
 /* Hardware address. */
diff --git a/lib/odp-execute.c b/lib/odp-execute.c
index 98ac18c..079b0b4 100644
--- a/lib/odp-execute.c
+++ b/lib/odp-execute.c
@@ -24,12 +24,12 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "dp-packet.h"
 #include "dpif.h"
 #include "netlink.h"
 #include "ofpbuf.h"
 #include "odp-netlink.h"
 #include "odp-util.h"
-#include "packet-dpif.h"
 #include "packets.h"
 #include "flow.h"
 #include "unaligned.h"
@@ -225,7 +225,7 @@ odp_set_nd(struct ofpbuf *packet, const struct ovs_key_nd 
*key,
 }
 
 static void
-odp_execute_set_action(struct dpif_packet *packet, const struct nlattr *a)
+odp_execute_set_action(struct dp_packet *packet, const struct nlattr *a)
 {
     enum ovs_key_attr type = nl_attr_type(a);
     const struct ovs_key_ipv4 *ipv4_key;
@@ -313,7 +313,7 @@ odp_execute_set_action(struct dpif_packet *packet, const 
struct nlattr *a)
 
     case OVS_KEY_ATTR_DP_HASH:
         md->dp_hash = nl_attr_get_u32(a);
-        dpif_packet_set_dp_hash(packet, md->dp_hash);
+        dp_packet_set_dp_hash(packet, md->dp_hash);
         break;
 
     case OVS_KEY_ATTR_RECIRC_ID:
@@ -337,7 +337,7 @@ odp_execute_set_action(struct dpif_packet *packet, const 
struct nlattr *a)
 #define get_mask(a, type) ((const type *)(const void *)(a + 1) + 1)
 
 static void
-odp_execute_masked_set_action(struct dpif_packet *packet,
+odp_execute_masked_set_action(struct dp_packet *packet,
                               const struct nlattr *a)
 {
     struct pkt_metadata *md = &packet->md;
@@ -406,8 +406,8 @@ odp_execute_masked_set_action(struct dpif_packet *packet,
 
     case OVS_KEY_ATTR_DP_HASH:
         md->dp_hash = nl_attr_get_u32(a)
-            | (dpif_packet_get_dp_hash(packet) & ~*get_mask(a, uint32_t));
-        dpif_packet_set_dp_hash(packet, md->dp_hash);
+            | (dp_packet_get_dp_hash(packet) & ~*get_mask(a, uint32_t));
+        dp_packet_set_dp_hash(packet, md->dp_hash);
         break;
 
     case OVS_KEY_ATTR_RECIRC_ID:
@@ -431,7 +431,7 @@ odp_execute_masked_set_action(struct dpif_packet *packet,
 }
 
 static void
-odp_execute_sample(void *dp, struct dpif_packet *packet, bool steal,
+odp_execute_sample(void *dp, struct dp_packet *packet, bool steal,
                    const struct nlattr *action,
                    odp_execute_cb dp_execute_action)
 {
@@ -446,7 +446,7 @@ odp_execute_sample(void *dp, struct dpif_packet *packet, 
bool steal,
         case OVS_SAMPLE_ATTR_PROBABILITY:
             if (random_uint32() >= nl_attr_get_u32(a)) {
                 if (steal) {
-                    dpif_packet_delete(packet);
+                    dp_packet_delete(packet);
                 }
                 return;
             }
@@ -468,7 +468,7 @@ odp_execute_sample(void *dp, struct dpif_packet *packet, 
bool steal,
 }
 
 void
-odp_execute_actions(void *dp, struct dpif_packet **packets, int cnt, bool 
steal,
+odp_execute_actions(void *dp, struct dp_packet **packets, int cnt, bool steal,
                     const struct nlattr *actions, size_t actions_len,
                     odp_execute_cb dp_execute_action)
 {
@@ -518,7 +518,7 @@ odp_execute_actions(void *dp, struct dpif_packet **packets, 
int cnt, bool steal,
                     hash = flow_hash_5tuple(&flow, hash_act->hash_basis);
 
                     /* We also store the hash value with each packet */
-                    dpif_packet_set_dp_hash(packets[i], hash ? hash : 1);
+                    dp_packet_set_dp_hash(packets[i], hash ? hash : 1);
                 }
             } else {
                 /* Assert on unknown hash algorithm.  */
@@ -598,7 +598,7 @@ odp_execute_actions(void *dp, struct dpif_packet **packets, 
int cnt, bool steal,
 
     if (steal) {
         for (i = 0; i < cnt; i++) {
-            dpif_packet_delete(packets[i]);
+            dp_packet_delete(packets[i]);
         }
     }
 }
diff --git a/lib/odp-execute.h b/lib/odp-execute.h
index 4710bec..c602bb4 100644
--- a/lib/odp-execute.h
+++ b/lib/odp-execute.h
@@ -24,17 +24,17 @@
 #include "openvswitch/types.h"
 
 struct nlattr;
-struct dpif_packet;
+struct dp_packet;
 struct pkt_metadata;
 
-typedef void (*odp_execute_cb)(void *dp, struct dpif_packet **packets, int cnt,
+typedef void (*odp_execute_cb)(void *dp, struct dp_packet **packets, int cnt,
                                const struct nlattr *action, bool may_steal);
 
 /* Actions that need to be executed in the context of a datapath are handed
  * to 'dp_execute_action', if non-NULL.  Currently this is called only for
  * actions OVS_ACTION_ATTR_OUTPUT and OVS_ACTION_ATTR_USERSPACE so
  * 'dp_execute_action' needs to handle only these. */
-void odp_execute_actions(void *dp, struct dpif_packet **packets, int cnt,
+void odp_execute_actions(void *dp, struct dp_packet **packets, int cnt,
                          bool steal,
                          const struct nlattr *actions, size_t actions_len,
                          odp_execute_cb dp_execute_action);
diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c
index 4946e6f..3886261 100644
--- a/lib/ofpbuf.c
+++ b/lib/ofpbuf.c
@@ -138,8 +138,8 @@ ofpbuf_uninit(struct ofpbuf *b)
         } else if (b->source == OFPBUF_DPDK) {
 #ifdef DPDK_NETDEV
             /* If this ofpbuf was allocated by DPDK it must have been
-             * created as a dpif_packet */
-            free_dpdk_buf((struct dpif_packet*) b);
+             * created as a dp_packet */
+            free_dpdk_buf((struct dp_packet*) b);
 #else
             ovs_assert(b->source != OFPBUF_DPDK);
 #endif
diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h
index 82588e3..7aed44e 100644
--- a/lib/ofpbuf.h
+++ b/lib/ofpbuf.h
@@ -181,8 +181,8 @@ static inline void ofpbuf_delete(struct ofpbuf *b)
     if (b) {
         if (b->source == OFPBUF_DPDK) {
             /* If this ofpbuf was allocated by DPDK it must have been
-             * created as a dpif_packet */
-            free_dpdk_buf((struct dpif_packet*) b);
+             * created as a dp_packet */
+            free_dpdk_buf((struct dp_packet*) b);
             return;
         }
 
diff --git a/lib/tnl-arp-cache.c b/lib/tnl-arp-cache.c
index 89f38cf..8b7228e 100644
--- a/lib/tnl-arp-cache.c
+++ b/lib/tnl-arp-cache.c
@@ -21,6 +21,7 @@
 #include "bitmap.h"
 #include "cmap.h"
 #include "coverage.h"
+#include "dp-packet.h"
 #include "dpif-netdev.h"
 #include "dynamic-string.h"
 #include "errno.h"
@@ -28,7 +29,6 @@
 #include "netdev.h"
 #include "ovs-thread.h"
 #include "packets.h"
-#include "packet-dpif.h"
 #include "poll-loop.h"
 #include "seq.h"
 #include "timeval.h"
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 5b9f1c8..2373820 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -31,6 +31,7 @@
 #include "cfm.h"
 #include "connmgr.h"
 #include "coverage.h"
+#include "dp-packet.h"
 #include "dpif.h"
 #include "dynamic-string.h"
 #include "in-band.h"
@@ -52,7 +53,6 @@
 #include "ofproto/ofproto-dpif-sflow.h"
 #include "ofproto/ofproto-dpif.h"
 #include "ofproto/ofproto-provider.h"
-#include "packet-dpif.h"
 #include "ovs-router.h"
 #include "tnl-ports.h"
 #include "tunnel.h"
@@ -3196,14 +3196,14 @@ execute_controller_action(struct xlate_ctx *ctx, int 
len,
                           uint16_t controller_id)
 {
     struct ofproto_packet_in *pin;
-    struct dpif_packet *packet;
+    struct dp_packet *packet;
 
     ctx->xout->slow |= SLOW_CONTROLLER;
     if (!ctx->xin->packet) {
         return;
     }
 
-    packet = dpif_packet_clone_from_ofpbuf(ctx->xin->packet);
+    packet = dp_packet_clone_from_ofpbuf(ctx->xin->packet);
 
     ctx->xout->slow |= commit_odp_actions(&ctx->xin->flow, &ctx->base_flow,
                                           ctx->xout->odp_actions,
@@ -3244,7 +3244,7 @@ execute_controller_action(struct xlate_ctx *ctx, int len,
         }
     }
     ofproto_dpif_send_packet_in(ctx->xbridge->ofproto, pin);
-    dpif_packet_delete(packet);
+    dp_packet_delete(packet);
 }
 
 static void
-- 
1.7.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to