diff mbox series

[net-next,2/2] net: hsr: Remove interlink_sequence_nr.

Message ID 20240906132816.657485-3-bigeasy@linutronix.de (mailing list archive)
State Accepted
Commit 35e24f28c2e9b2c3b711200b07e4f9926f464c6b
Delegated to: Netdev Maintainers
Headers show
Series net: hsr: Use the seqnr lock for frames received via interlink port. | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 2 maintainers not CCed: horms@kernel.org m-karicheri2@ti.com
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sebastian Andrzej Siewior Sept. 6, 2024, 1:25 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

Remove interlink_sequence_nr which is unused.

[ bigeasy: split out from Eric's patch ].

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/hsr/hsr_device.c | 1 -
 net/hsr/hsr_main.h   | 1 -
 2 files changed, 2 deletions(-)

Comments

Lukasz Majewski Sept. 9, 2024, 9:43 a.m. UTC | #1
Hi Sebastian Andrzej,

> From: Eric Dumazet <edumazet@google.com>
> 
> Remove interlink_sequence_nr which is unused.
> 
> [ bigeasy: split out from Eric's patch ].
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  net/hsr/hsr_device.c | 1 -
>  net/hsr/hsr_main.h   | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
> index a06e790042e2e..10393836992df 100644
> --- a/net/hsr/hsr_device.c
> +++ b/net/hsr/hsr_device.c
> @@ -625,7 +625,6 @@ int hsr_dev_finalize(struct net_device *hsr_dev,
> struct net_device *slave[2], /* Overflow soon to find bugs easier: */
>  	hsr->sequence_nr = HSR_SEQNR_START;
>  	hsr->sup_sequence_nr = HSR_SUP_SEQNR_START;
> -	hsr->interlink_sequence_nr = HSR_SEQNR_START;
>  
>  	timer_setup(&hsr->announce_timer, hsr_announce, 0);
>  	timer_setup(&hsr->prune_timer, hsr_prune_nodes, 0);
> diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
> index ab1f8d35d9dcf..fcfeb79bb0401 100644
> --- a/net/hsr/hsr_main.h
> +++ b/net/hsr/hsr_main.h
> @@ -203,7 +203,6 @@ struct hsr_priv {
>  	struct timer_list	prune_proxy_timer;
>  	int announce_count;
>  	u16 sequence_nr;
> -	u16 interlink_sequence_nr; /* Interlink port seq_nr */

I think that this was an attempt to exactly follow standard (point
5.2.2.2 HSR-SAN RedBox for attachment to a single-thread LAN) which
states that proxy node table shall keep for each interlink the sequence
number [*]. Instead in code the sequence number for a new frame which
comes from interlink port is assigned int:

hsr_get_node() -> file line 271 

and then this starting sequence numer is used for this proxy node table
node.

Hence it shall be safe to remove it.

>  	u16 sup_sequence_nr;	/* For HSRv1 separate seq_nr for
> supervision */ enum hsr_version prot_version;	/* Indicate if
> HSRv0, HSRv1 or PRPv1 */ spinlock_t seqnr_lock;	/* locking for
> sequence_nr */




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff mbox series

Patch

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index a06e790042e2e..10393836992df 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -625,7 +625,6 @@  int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
 	/* Overflow soon to find bugs easier: */
 	hsr->sequence_nr = HSR_SEQNR_START;
 	hsr->sup_sequence_nr = HSR_SUP_SEQNR_START;
-	hsr->interlink_sequence_nr = HSR_SEQNR_START;
 
 	timer_setup(&hsr->announce_timer, hsr_announce, 0);
 	timer_setup(&hsr->prune_timer, hsr_prune_nodes, 0);
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index ab1f8d35d9dcf..fcfeb79bb0401 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -203,7 +203,6 @@  struct hsr_priv {
 	struct timer_list	prune_proxy_timer;
 	int announce_count;
 	u16 sequence_nr;
-	u16 interlink_sequence_nr; /* Interlink port seq_nr */
 	u16 sup_sequence_nr;	/* For HSRv1 separate seq_nr for supervision */
 	enum hsr_version prot_version;	/* Indicate if HSRv0, HSRv1 or PRPv1 */
 	spinlock_t seqnr_lock;	/* locking for sequence_nr */