[ovs-dev] [PATCH 2/4] dpif_packet: Rename to dp_packet
Kavanagh, Mark B
mark.b.kavanagh at intel.com
Tue Mar 3 11:45:52 UTC 2015
> Subject: [ovs-dev] [PATCH 2/4] dpif_packet: Rename to dp_packet
>
> dp_packet is shorter, so I prefer it over current name.
>
> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
> ---
(snip)
> 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"
Is there a specific reason why the 'dp' prefix is used in some files, and 'dpif' in others?
If not, consider changing the 'dpif' prefix to 'dp', for consistency and coherency.
> #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
> *)
(snip)
> @@ -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)
Ditto
> {
> 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 {
>
(snip)
> 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)
Slightly pedantic perhaps, but consider 'dp_pkt', or just 'packet' for the parameter name (the latter seems to be the convention in other files).
> {
> 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)
>
(snip)
> --
> 1.7.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
Some small comments above, otherwise:
Acked-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
More information about the dev
mailing list