[ovs-dev] [PATCH 2/4] netdev-dummy: Limit receive queue length to 100 packets.

Ben Pfaff blp at nicira.com
Thu Aug 16 23:36:55 UTC 2012


On Thu, Aug 16, 2012 at 03:49:38PM -0700, Ethan Jackson wrote:
> >      struct list recv_queue;
> > +#define NETDEV_DUMMY_MAX_QUEUE 100
> > +    int recv_queue_len;         /* list_size(&recv_queue). */
> >      bool listening;
> >  };
> 
> Do we have precedent for doing a #define in a struct definition like
> this?  It looks a bit weird to me.

It's a bit weird, though not without precedent (e.g. see
JSON_MAX_HEIGHT).

I moved NETDEV_DUMMY_MAX_QUEUE above the struct and added a comment.

> Otherwise looks good, thanks.

Thanks for the review.



More information about the dev mailing list