>Add an OVS_UNLIKELY and reorder a few variable condition checks. > >Signed-off-by: Darrell Ball <dlu...@gmail.com> >--- > lib/conntrack.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/lib/conntrack.c b/lib/conntrack.c index 59d3c4e..c94bc27 100644 >--- a/lib/conntrack.c >+++ b/lib/conntrack.c >@@ -1104,7 +1104,7 @@ process_one(struct conntrack *ct, struct dp_packet >*pkt, > > bool tftp_ctl = is_tftp_ctl(pkt); > struct conn conn_for_expectation; >- if (conn && (ftp_ctl || tftp_ctl)) { >+ if (OVS_UNLIKELY((ftp_ctl || tftp_ctl) && conn)) { > conn_for_expectation = *conn; > } > >@@ -1115,10 +1115,10 @@ process_one(struct conntrack *ct, struct >dp_packet *pkt, > } > > /* FTP control packet handling with expectation creation. */ >- if (OVS_UNLIKELY(conn && ftp_ctl)) { >+ if (OVS_UNLIKELY(ftp_ctl && conn)) { > handle_ftp_ctl(ct, ctx, pkt, &conn_for_expectation, > now, CT_FTP_CTL_INTEREST, !!nat_action_info); >- } else if (OVS_UNLIKELY(conn && tftp_ctl)) { >+ } else if (OVS_UNLIKELY(tftp_ctl && conn)) { > handle_tftp_ctl(ct, &conn_for_expectation, now); > } > }
LGTM Acked-by: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com> _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev