teamd/lacp: fix incorrect aggregator selection
diff mbox series

Message ID 1583149388-30061-1-git-send-email-konst.ru@gmail.com
State New
Headers show
Series
  • teamd/lacp: fix incorrect aggregator selection
Related show

Commit Message

kon5t March 2, 2020, 11:43 a.m. UTC
No need to `ntohs` values when comparing bytes.

Signed-off-by: kon5t <konst.ru@gmail.com>
---
 teamd/teamd_runner_lacp.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jiri Pirko March 8, 2020, 6:57 a.m. UTC | #1
Mon, Mar 02, 2020 at 12:43:08PM CET, konst.ru@gmail.com wrote:
>No need to `ntohs` values when comparing bytes.
>
>Signed-off-by: kon5t <konst.ru@gmail.com>

1) Please use your name in signed off line.
2) Why this patch is a "fix"?
3) Why this patch is needed. Doesn't the code work without it?
4) Why did you send the patch 2 times?


>---
> teamd/teamd_runner_lacp.c | 3 ---
> 1 file changed, 3 deletions(-)
>
>diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
>index ec01237..709008e 100644
>--- a/teamd/teamd_runner_lacp.c
>+++ b/teamd/teamd_runner_lacp.c
>@@ -406,10 +406,7 @@ static void get_lacp_port_prio_info(struct lacp_port *lacp_port,
> 		*prio_info = lacp_port->partner;
> 
> 	/* adjust values for further memcmp comparison */
>-	prio_info->system_priority = ntohs(prio_info->system_priority);
> 	prio_info->key = 0;
>-	prio_info->port_priority = ntohs(prio_info->port_priority);
>-	prio_info->port = ntohs(prio_info->port);
> 	prio_info->state = 0;
> }
> 
>-- 
>2.7.4
>

Patch
diff mbox series

diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index ec01237..709008e 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -406,10 +406,7 @@  static void get_lacp_port_prio_info(struct lacp_port *lacp_port,
 		*prio_info = lacp_port->partner;
 
 	/* adjust values for further memcmp comparison */
-	prio_info->system_priority = ntohs(prio_info->system_priority);
 	prio_info->key = 0;
-	prio_info->port_priority = ntohs(prio_info->port_priority);
-	prio_info->port = ntohs(prio_info->port);
 	prio_info->state = 0;
 }