On Thu, Apr 23, 2015 at 11:39 AM, Daniele Di Proietto
<diproiet...@vmware.com> wrote:
> The 'list' member is only used (two users) in the slow path.
> This commit removes it to reduce the struct size
>
> Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
> ---
>  lib/dp-packet.c        | 13 -------------
>  lib/dp-packet.h        |  8 --------
>  lib/netdev-dummy.c     | 50 
> ++++++++++++++++++++++++++++++++++++++++++--------
>  ofproto/ofproto-dpif.c | 30 ++++++++++++++----------------
>  4 files changed, 56 insertions(+), 45 deletions(-)
>
...
...
>          } else if (retval != -EAGAIN) {
> @@ -261,9 +273,15 @@ dummy_packet_stream_run(struct netdev_dummy *dev, struct 
> dummy_packet_stream *s)
>  static void
>  dummy_packet_stream_close(struct dummy_packet_stream *s)
>  {
> +    struct pkt_list_node *pkt;
> +
>      stream_close(s->stream);
>      dp_packet_uninit(&s->rxbuf);
> -    dp_packet_list_delete(&s->txq);
> +
> +    LIST_FOR_EACH_POP(pkt, list_node, &s->txq) {
> +        dp_packet_delete(pkt->pkt);
> +        free(pkt);
> +    }
I see this code duplicated in this file. Can you add function to
delete packets from this list so that is can be used in other
functions.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to