netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner
@ 2024-02-22  9:04 Jones Syue 薛懷宗
  2024-02-23  3:27 ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Jones Syue 薛懷宗 @ 2024-02-22  9:04 UTC (permalink / raw)
  To: netdev@vger.kernel.org


They are verifying the same thing: if aggregator has a partner or not.
Replaces macro with inline function would look more clear to understand.

Signed-off-by: Jones Syue <jonessyue@qnap.com>
---
 drivers/net/bonding/bond_3ad.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index f2942e8..eb3c2d1 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2036,9 +2036,7 @@ static void ad_enable_collecting(struct port *port)
  */
 static void ad_disable_distributing(struct port *port, bool *update_slave_arr)
 {
-	if (port->aggregator &&
-	    !MAC_ADDRESS_EQUAL(&port->aggregator->partner_system,
-			       &(null_mac_addr))) {
+	if (port->aggregator && __agg_has_partner(port->aggregator)) {
 		slave_dbg(port->slave->bond->dev, port->slave->dev,
 			  "Disabling distributing on port %d (LAG %d)\n",
 			  port->actor_port_number,
@@ -2078,9 +2076,7 @@ static void ad_enable_collecting_distributing(struct port *port,
 static void ad_disable_collecting_distributing(struct port *port,
 					       bool *update_slave_arr)
 {
-	if (port->aggregator &&
-	    !MAC_ADDRESS_EQUAL(&(port->aggregator->partner_system),
-			       &(null_mac_addr))) {
+	if (port->aggregator && __agg_has_partner(port->aggregator)) {
 		slave_dbg(port->slave->bond->dev, port->slave->dev,
 			  "Disabling port %d (LAG %d)\n",
 			  port->actor_port_number,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with  __agg_has_partner
  2024-02-22  9:04 [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner Jones Syue 薛懷宗
@ 2024-02-23  3:27 ` Jakub Kicinski
  2024-02-23  3:54   ` Jones Syue 薛懷宗
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-02-23  3:27 UTC (permalink / raw)
  To: Jones Syue 薛懷宗; +Cc: netdev@vger.kernel.org

On Thu, 22 Feb 2024 09:04:36 +0000 Jones Syue 薛懷宗 wrote:
> To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>

You need to CC the maintainers. Please use ./script/get_maintainer.pl
to identify the right recipients and resend the patch.
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner
  2024-02-23  3:27 ` Jakub Kicinski
@ 2024-02-23  3:54   ` Jones Syue 薛懷宗
  2024-02-23  9:53     ` Jiri Pirko
  0 siblings, 1 reply; 5+ messages in thread
From: Jones Syue 薛懷宗 @ 2024-02-23  3:54 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: netdev@vger.kernel.org

> You need to CC the maintainers. Please use ./script/get_maintainer.pl
> to identify the right recipients and resend the patch.

Thank you for kindly feedback! Sure will resend with correct CC :)

--

Regards,
Jones Syue | 薛懷宗
QNAP Systems, Inc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner
  2024-02-23  3:54   ` Jones Syue 薛懷宗
@ 2024-02-23  9:53     ` Jiri Pirko
  2024-02-23 14:23       ` Jones Syue 薛懷宗
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Pirko @ 2024-02-23  9:53 UTC (permalink / raw)
  To: Jones Syue 薛懷宗
  Cc: Jakub Kicinski, netdev@vger.kernel.org

Fri, Feb 23, 2024 at 04:54:11AM CET, jonessyue@qnap.com wrote:
>> You need to CC the maintainers. Please use ./script/get_maintainer.pl
>> to identify the right recipients and resend the patch.
>
>Thank you for kindly feedback! Sure will resend with correct CC :)

While you are sending next v, please re-phrase the patch desctiption
using imperative mood:

https://www.kernel.org/doc/html/v6.6/process/submitting-patches.html#describe-your-changes


>
>--
>
>Regards,
>Jones Syue | 薛懷宗
>QNAP Systems, Inc.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner
  2024-02-23  9:53     ` Jiri Pirko
@ 2024-02-23 14:23       ` Jones Syue 薛懷宗
  0 siblings, 0 replies; 5+ messages in thread
From: Jones Syue 薛懷宗 @ 2024-02-23 14:23 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Jakub Kicinski, netdev@vger.kernel.org

> While you are sending next v, please re-phrase the patch desctiption
> using imperative mood:
> https://www.kernel.org/doc/html/v6.6/process/submitting-patches.html#describe-your-changes

Thank you for kindly feedback! Sure will do in next v :)

--

Regards,
Jones Syue | 薛懷宗
QNAP Systems, Inc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-23 14:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22  9:04 [PATCH net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner Jones Syue 薛懷宗
2024-02-23  3:27 ` Jakub Kicinski
2024-02-23  3:54   ` Jones Syue 薛懷宗
2024-02-23  9:53     ` Jiri Pirko
2024-02-23 14:23       ` Jones Syue 薛懷宗

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).