All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: shaozhengchao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	weiyongjun1@huawei.com, yuehaibing@huawei.com
Subject: Re: [PATCH net-next 6/6] team: remove unused input parameters in lb_htpm_select_tx_port and lb_hash_select_tx_port
Date: Fri, 4 Aug 2023 18:56:04 +0200	[thread overview]
Message-ID: <ZM0tpBCYYmNPnwRI@nanopsycho> (raw)
In-Reply-To: <4b0bde83-5187-521d-e90b-1f36da541ce8@huawei.com>

Fri, Aug 04, 2023 at 04:06:39PM CEST, shaozhengchao@huawei.com wrote:
>
>
>On 2023/8/4 21:45, Jiri Pirko wrote:
>> Fri, Aug 04, 2023 at 02:31:16PM CEST, shaozhengchao@huawei.com wrote:
>> > The input parameters "lb_priv" and "skb" in lb_htpm_select_tx_port and
>> > lb_hash_select_tx_port are unused, so remove them.
>> > 
>> > Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
>> > ---
>> > drivers/net/team/team_mode_loadbalance.c | 10 ++--------
>> > 1 file changed, 2 insertions(+), 8 deletions(-)
>> > 
>> > diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
>> > index a6021ae51d0d..00f8989c29c0 100644
>> > --- a/drivers/net/team/team_mode_loadbalance.c
>> > +++ b/drivers/net/team/team_mode_loadbalance.c
>> > @@ -30,8 +30,6 @@ static rx_handler_result_t lb_receive(struct team *team, struct team_port *port,
>> > struct lb_priv;
>> > 
>> > typedef struct team_port *lb_select_tx_port_func_t(struct team *,
>> > -						   struct lb_priv *,
>> > -						   struct sk_buff *,
>> > 						   unsigned char);
>> > 
>> > #define LB_TX_HASHTABLE_SIZE 256 /* hash is a char */
>> > @@ -118,8 +116,6 @@ static void lb_tx_hash_to_port_mapping_null_port(struct team *team,
>> > 
>> > /* Basic tx selection based solely by hash */
>> > static struct team_port *lb_hash_select_tx_port(struct team *team,
>> > -						struct lb_priv *lb_priv,
>> > -						struct sk_buff *skb,
>> > 						unsigned char hash)
>> > {
>> > 	int port_index = team_num_to_port_index(team, hash);
>> > @@ -129,8 +125,6 @@ static struct team_port *lb_hash_select_tx_port(struct team *team,
>> > 
>> > /* Hash to port mapping select tx port */
>> > static struct team_port *lb_htpm_select_tx_port(struct team *team,
>> > -						struct lb_priv *lb__priv,
>> 
>> Squash the previous patch in this one to avoid this odd "__" thing.
>> 
>> Thanks!
>> 
>Hi Jiri:
>	Thank you for your review. I will change it and send v2.

Did you hear about netdev rules by any chance?

https://www.kernel.org/doc/html/v6.5-rc4/process/maintainer-netdev.html?highlight=24h

Could you please read it?


>
>Zhengchao Shao
>> 
>> > -						struct sk_buff *skb,
>> > 						unsigned char hash)
>> > {
>> > 	struct lb_priv *lb_priv = get_lb_priv(team);
>> > @@ -140,7 +134,7 @@ static struct team_port *lb_htpm_select_tx_port(struct team *team,
>> > 	if (likely(port))
>> > 		return port;
>> > 	/* If no valid port in the table, fall back to simple hash */
>> > -	return lb_hash_select_tx_port(team, lb_priv, skb, hash);
>> > +	return lb_hash_select_tx_port(team, hash);
>> > }
>> > 
>> > struct lb_select_tx_port {
>> > @@ -230,7 +224,7 @@ static bool lb_transmit(struct team *team, struct sk_buff *skb)
>> > 
>> > 	hash = lb_get_skb_hash(lb_priv, skb);
>> > 	select_tx_port_func = rcu_dereference_bh(lb_priv->select_tx_port_func);
>> > -	port = select_tx_port_func(team, lb_priv, skb, hash);
>> > +	port = select_tx_port_func(team, hash);
>> > 	if (unlikely(!port))
>> > 		goto drop;
>> > 	if (team_dev_queue_xmit(team, port, skb))
>> > -- 
>> > 2.34.1
>> > 
>> 

  reply	other threads:[~2023-08-04 16:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 12:31 [PATCH net-next 0/6] team: do some cleanups in team driver Zhengchao Shao
2023-08-04 12:31 ` [PATCH net-next 1/6] team: add __exit modifier to team_nl_fini() Zhengchao Shao
2023-08-04 12:31 ` [PATCH net-next 2/6] team: remove unreferenced header in activebackup/broadcast/roundrobin files Zhengchao Shao
2023-08-04 12:31 ` [PATCH net-next 3/6] team: change the init function in the team_option structure to void Zhengchao Shao
2023-08-04 12:31 ` [PATCH net-next 4/6] team: change the getter " Zhengchao Shao
2023-08-04 12:31 ` [PATCH net-next 5/6] team: get lb_priv from team directly in lb_htpm_select_tx_port Zhengchao Shao
2023-08-04 12:31 ` [PATCH net-next 6/6] team: remove unused input parameters in lb_htpm_select_tx_port and lb_hash_select_tx_port Zhengchao Shao
2023-08-04 13:45   ` Jiri Pirko
2023-08-04 14:06     ` shaozhengchao
2023-08-04 16:56       ` Jiri Pirko [this message]
2023-08-05  2:04         ` shaozhengchao
2023-08-05 11:55 ` [PATCH net-next 0/6] team: do some cleanups in team driver Simon Horman
2023-08-07  1:03   ` shaozhengchao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZM0tpBCYYmNPnwRI@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.