[ovs-dev] [PATCH 1/3] ofproto-dpif-xlate: Pull STP xlation into ofproto-dpif-xlate.
Ben Pfaff
blp at nicira.com
Fri Aug 2 18:06:50 UTC 2013
On Thu, Aug 01, 2013 at 03:55:45PM -0700, Ethan Jackson wrote:
> This patch pulls the STP xlation code into ofproto-dpif-xlate where it
> will be easier to guard.
>
> Signed-off-by: Ethan Jackson <ethan at nicira.com>
The xlate_ofproto_set() and xlate_ofport_set() function signatures are
pretty nasty. That's mostly a throwaway comment; I don't expect you to
change them for this patch, but maybe later we can think of a better
way (struct?).
Expressions like this one appear a few times:
enum stp_state stp_state = xport->xbridge->stp && xport->stp_port_no
? stp_port_get_state(stp_get_port(xport->xbridge->stp,
xport->stp_port_no))
: STP_DISABLED;
Could we define a function to return, roughly,
xport->xbridge->stp && xport->stp_port_no
? stp_get_port(xport->xbridge->stp, xport->stp_port_no)
: NULL;
and then use that helper?
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list