[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200711112256.4153f2d9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Sat, 11 Jul 2020 11:22:56 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Machata <petrm@...lanox.com>
Cc: netdev@...r.kernel.org, Pablo Neira Ayuso <pablo@...filter.org>,
davem@...emloft.net, jiri@...lanox.com, mlxsw@...lanox.com,
michael.chan@...adcom.com, saeedm@...lanox.com, leon@...nel.org,
kadlec@...filter.org, fw@...len.de, jhs@...atatu.com,
xiyou.wangcong@...il.com, simon.horman@...ronome.com,
Ido Schimmel <idosch@...lanox.com>
Subject: Re: [PATCH net-next v2 01/13] net: sched: Pass qdisc reference in
struct flow_block_offload
On Sat, 11 Jul 2020 00:55:03 +0300 Petr Machata wrote:
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> index 0a9a4467d7c7..e82e5cf64d61 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> @@ -1888,7 +1888,7 @@ static void bnxt_tc_setup_indr_rel(void *cb_priv)
> kfree(priv);
> }
>
> -static int bnxt_tc_setup_indr_block(struct net_device *netdev, struct bnxt *bp,
> +static int bnxt_tc_setup_indr_block(struct net_device *netdev, struct Qdisc *sch, struct bnxt *bp,
> struct flow_block_offload *f, void *data,
> void (*cleanup)(struct flow_block_cb *block_cb))
> {
> @@ -1911,7 +1911,7 @@ static int bnxt_tc_setup_indr_block(struct net_device *netdev, struct bnxt *bp,
> block_cb = flow_indr_block_cb_alloc(bnxt_tc_setup_indr_block_cb,
> cb_priv, cb_priv,
> bnxt_tc_setup_indr_rel, f,
> - netdev, data, bp, cleanup);
> + netdev, sch, data, bp, cleanup);
nit: the number of arguments is getting out of hand here, perhaps it's
time to pass a structure in.
> if (IS_ERR(block_cb)) {
> list_del(&cb_priv->list);
> kfree(cb_priv);
> @@ -1946,7 +1946,7 @@ static bool bnxt_is_netdev_indr_offload(struct net_device *netdev)
> return netif_is_vxlan(netdev);
> }
>
> -static int bnxt_tc_setup_indr_cb(struct net_device *netdev, void *cb_priv,
> +static int bnxt_tc_setup_indr_cb(struct net_device *netdev, struct Qdisc *sch, void *cb_priv,
> enum tc_setup_type type, void *type_data,
> void *data,
> void (*cleanup)(struct flow_block_cb *block_cb))
> @@ -1956,8 +1956,7 @@ static int bnxt_tc_setup_indr_cb(struct net_device *netdev, void *cb_priv,
>
> switch (type) {
> case TC_SETUP_BLOCK:
> - return bnxt_tc_setup_indr_block(netdev, cb_priv, type_data, data,
> - cleanup);
> + return bnxt_tc_setup_indr_block(netdev, sch, cb_priv, type_data, data, cleanup);
> default:
> break;
> }
Powered by blists - more mailing lists