* re: net/mlx5: E-Switch, Add SR-IOV (FDB) support
@ 2015-12-10 10:35 Dan Carpenter
2015-12-10 14:45 ` Saeed Mahameed
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-12-10 10:35 UTC (permalink / raw)
To: saeedm-VPRAkNaXOzVWk0Htik3J/w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hello Saeed Mahameed,
The patch 81848731ff40: "net/mlx5: E-Switch, Add SR-IOV (FDB)
support" from Dec 1, 2015, leads to the following static checker
warning:
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c:579 esw_fdb_set_vport_rule()
warn: passing zero to 'PTR_ERR'
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
568 esw_debug(esw->dev,
569 "\tFDB add rule dmac_v(%pM) dmac_c(%pM) -> vport(%d)\n",
570 dmac_v, dmac_c, vport);
571 flow_rule =
572 mlx5_add_flow_rule(esw,
573 match_header,
574 match_c,
575 match_v,
576 MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,
577 0, &dest);
578 if (IS_ERR_OR_NULL(flow_rule)) {
mlx5_add_flow_rule() only returns NULL on error. It never returns
ERR_PTRs.
579 pr_warn(
580 "FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%ld)\n",
^^^^^^^^
It's not a terrible bug but this always says "err(0)" which is not very
useful, and it causes this static checker warning.
581 dmac_v, dmac_c, vport, PTR_ERR(flow_rule));
582 flow_rule = NULL;
583 }
584 out:
585 kfree(match_v);
586 kfree(match_c);
587 return flow_rule;
588 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: net/mlx5: E-Switch, Add SR-IOV (FDB) support
2015-12-10 10:35 net/mlx5: E-Switch, Add SR-IOV (FDB) support Dan Carpenter
@ 2015-12-10 14:45 ` Saeed Mahameed
0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2015-12-10 14:45 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Saeed Mahameed, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Thu, Dec 10, 2015 at 12:35 PM, Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> Hello Saeed Mahameed,
>
> The patch 81848731ff40: "net/mlx5: E-Switch, Add SR-IOV (FDB)
> support" from Dec 1, 2015, leads to the following static checker
> warning:
>
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.c:579 esw_fdb_set_vport_rule()
> warn: passing zero to 'PTR_ERR'
>
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> 568 esw_debug(esw->dev,
> 569 "\tFDB add rule dmac_v(%pM) dmac_c(%pM) -> vport(%d)\n",
> 570 dmac_v, dmac_c, vport);
> 571 flow_rule =
> 572 mlx5_add_flow_rule(esw,
> 573 match_header,
> 574 match_c,
> 575 match_v,
> 576 MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,
> 577 0, &dest);
> 578 if (IS_ERR_OR_NULL(flow_rule)) {
>
> mlx5_add_flow_rule() only returns NULL on error. It never returns
> ERR_PTRs.
>
> 579 pr_warn(
> 580 "FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%ld)\n",
> ^^^^^^^^
> It's not a terrible bug but this always says "err(0)" which is not very
> useful, and it causes this static checker warning.
Hi Dan,
Thanks for pointing this out, this is already fixed in the latest flow
steering patches sent to net-next.
"net/mlx5: Use flow steering infrastructure for mlx5_en"
>
> 581 dmac_v, dmac_c, vport, PTR_ERR(flow_rule));
> 582 flow_rule = NULL;
> 583 }
> 584 out:
> 585 kfree(match_v);
> 586 kfree(match_c);
> 587 return flow_rule;
> 588 }
>
> regards,
> dan carpenter
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-10 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 10:35 net/mlx5: E-Switch, Add SR-IOV (FDB) support Dan Carpenter
2015-12-10 14:45 ` Saeed Mahameed
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.