All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH v2 net 7/7] hsr: Use a single struct for self_node.
Date: Tue, 22 Nov 2022 10:20:49 +0100	[thread overview]
Message-ID: <87sfib9wge.fsf@kurt> (raw)
In-Reply-To: <20221121174605.2456845-8-bigeasy@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

On Mon Nov 21 2022, Sebastian Andrzej Siewior wrote:
> self_node_db is a list_head with one entry of struct hsr_node. The
> purpose is to hold the two MAC addresses of the node itself.
> It is convenient to recycle the structure. However having a list_head
> and fetching always the first entry is not really optimal.
>
> Created a new data strucure contaning the two MAC addresses named
> hsr_self_node. Access that structured like an RCU protected pointer so
                             ^ structure

> it can be replaced on the fly withou blocking the reader.
                               ^ without

>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Lacks a Fixes tag. Looks rather like an optimization than a bugfix? So,
maybe this one should go to net-next instead.

[snip]

> +struct hsr_self_node {
> +	unsigned char	macaddress_A[6];
                                    ^ ETH_ALEN

> +	unsigned char	macaddress_B[6];
                                    ^ ETH_ALEN
> +	struct rcu_head	rcu_head;
> +};
> +

Thanks,
Kurt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2022-11-22  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 17:45 [PATCH v2 net] hsr: HSR send/recv fixes Sebastian Andrzej Siewior
2022-11-21 17:45 ` [PATCH v2 net 1/7] Revert "net: hsr: use hlist_head instead of list_head for mac addresses" Sebastian Andrzej Siewior
2022-11-21 17:46 ` [PATCH v2 net 2/7] hsr: Add a rcu-read lock to hsr_forward_skb() Sebastian Andrzej Siewior
2022-11-21 17:46 ` [PATCH v2 net 3/7] hsr: Avoid double remove of a node Sebastian Andrzej Siewior
2022-11-21 17:46 ` [PATCH v2 net 4/7] hsr: Disable netpoll Sebastian Andrzej Siewior
2022-11-21 17:46 ` [PATCH v2 net 5/7] hsr: Synchronize sending frames to have always incremented outgoing seq nr Sebastian Andrzej Siewior
2022-11-21 17:46 ` [PATCH v2 net 6/7] hsr: Synchronize sequence number updates Sebastian Andrzej Siewior
2022-11-21 17:46 ` [PATCH v2 net 7/7] hsr: Use a single struct for self_node Sebastian Andrzej Siewior
2022-11-22  9:20   ` Kurt Kanzenbach [this message]
2022-11-22  9:56     ` Sebastian Andrzej Siewior
2022-11-25  0:46   ` kernel test robot

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=87sfib9wge.fsf@kurt \
    --to=kurt@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tglx@linutronix.de \
    /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.