On Wed, Apr 8, 2015 at 1:19 PM, Jesse Gross <je...@nicira.com> wrote: > The userspace tunneling API for pushing and popping tunnel headers > is currently based on processing batches of packets. However, there > is no obvious way to take advantage of batching for these operations > and so each tunnel operation has a pair of loops to process the > batch. This changes the API to operate on single packets to enable > better code reuse. > > Signed-off-by: Jesse Gross <je...@nicira.com> > --- > lib/netdev-provider.h | 9 ++-- > lib/netdev-vport.c | 140 > +++++++++++--------------------------------------- > lib/netdev.c | 34 +++++++++--- > 3 files changed, 62 insertions(+), 121 deletions(-) > > diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h > index fabeb2d..a81f8f8 100644 > --- a/lib/netdev-provider.h > +++ b/lib/netdev-provider.h > @@ -264,14 +264,13 @@ struct netdev_class { > * flow. Push header is called for packet to build header specific to > * 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 dp_packet **buffers, int cnt, > - const struct ovs_action_push_tnl *data); > + void (*push_header)(const struct netdev *netdev, > + struct dp_packet *packet, > + 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 dp_packet **buffers, int cnt); > + int (*pop_header)(struct netdev *netdev, struct dp_packet *packet); > We can remove unused netdev parameter from push and pop calls. Otherwise looks good. Acked-by: Pravin B Shelar <pshe...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev