[dpdk-dev] [PATCH v2] ethdev: allow all ports event registration
Thomas Monjalon
thomas at monjalon.net
Sat Dec 30 21:51:06 CET 2017
30/12/2017 20:04, Matan Azrad:
> From: Thomas Monjalon, December 29, 2017
> > 04/12/2017 16:43, Matan Azrad:
> > > @@ -2827,37 +2837,59 @@
> > > + uint32_t next_port;
> > > + uint32_t last_port;
> >
> > A port id should be uint16_t.
> >
> Yes, I know but please note that we use next_port variable in the while statement and it can be rolled in case the max value of port id is the max value of uint16_t type.
> This is the reason I defined it as uint32_t type.
OK, so I suggest 2 possible fixes:
- either keep uint32_t with a comment in the code.
- or use a for loop
What do you prefer?
More information about the dev
mailing list