<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Sep 15, 2026 at 5:48 AM Evgeny Sokolov <<a href="mailto:Evgeny.Sokolov@infotecs.ru">Evgeny.Sokolov@infotecs.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Sokolov Evgeny <<a href="mailto:Evgeny.Sokolov@infotecs.ru" target="_blank">Evgeny.Sokolov@infotecs.ru</a>><br>
<br>
Use BNXT_ULP_INTF_TYPE_INVALID when checking the interface type<br>
returned by ulp_port_db_port_type_get().<br>
<br>
Comparing the enum value explicitly makes the code clearer and<br>
avoids relying on the numeric value of the invalid interface type.<br>
<br>
Found by InfoTeCS on behalf of Linux Verification Center (<a href="http://linuxtesting.org" rel="noreferrer" target="_blank">linuxtesting.org</a>) with SVACE.<br>
<br>
Signed-off-by: Sokolov Evgeny <<a href="mailto:Evgeny.Sokolov@infotecs.ru" target="_blank">Evgeny.Sokolov@infotecs.ru</a>><br>
---<br>
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c<br>
index 26823858b5..442a795430 100644<br>
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c<br>
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c<br>
@@ -3108,7 +3108,7 @@ ulp_rte_port_act_handler(const struct rte_flow_action *act_item,<br>
<br>
/* Get the intf type */<br>
intf_type = ulp_port_db_port_type_get(param->ulp_ctx, ifindex);<br>
- if (!intf_type) {<br>
+ if (intf_type == BNXT_ULP_INTF_TYPE_INVALID) {<br>
BNXT_DRV_DBG(ERR, "Invalid port type\n");<br>
return BNXT_TF_RC_ERROR;<br>
}<br>
--</blockquote><div><span style="font-family:Calibri;font-size:11pt;background-color:transparent">Acked-by: Kishore
Padmanabha <<a href="mailto:kishore.padmanabha@broadcom.com">kishore.padmanabha@broadcom.com</a>></span> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
2.30.2<br>
<br>
</blockquote></div></div>