netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 12/12] net: hldc_fr: use dev_addr_set()
Date: Fri, 22 Oct 2021 08:22:08 +0200	[thread overview]
Message-ID: <m3fsstd1f3.fsf@t19.piap.pl> (raw)
In-Reply-To: <20211021131214.2032925-13-kuba@kernel.org> (Jakub Kicinski's message of "Thu, 21 Oct 2021 06:12:14 -0700")

Jakub Kicinski <kuba@kernel.org> writes:

> Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
> of VLANs...") introduced a rbtree for faster Ethernet address look
> up. To maintain netdev->dev_addr in this tree we need to make all
> the writes to it got through appropriate helpers.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Acked-by: Krzysztof Hałasa <khalasa@piap.pl>

> --- a/drivers/net/wan/hdlc_fr.c
> +++ b/drivers/net/wan/hdlc_fr.c
> @@ -1093,7 +1093,9 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
>  		dev->priv_flags &= ~IFF_TX_SKB_SHARING;
>  		eth_hw_addr_random(dev);
>  	} else {
> -		*(__be16 *)dev->dev_addr = htons(dlci);
> +		__be16 addr = htons(dlci);
> +
> +		dev_addr_set(dev, (u8 *)&addr);
>  		dlci_to_q922(dev->broadcast, dlci);
>  	}
>  	dev->netdev_ops = &pvc_ops;

-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

  reply	other threads:[~2021-10-22  6:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 13:12 [PATCH net-next v2 00/12] net: don't write directly to netdev->dev_addr Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 01/12] net: xen: use eth_hw_addr_set() Jakub Kicinski
2021-10-23  0:41   ` Boris Ostrovsky
2021-10-25 10:55   ` Wei Liu
2021-10-21 13:12 ` [PATCH net-next v2 02/12] usb: smsc: " Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 03/12] net: qmi_wwan: use dev_addr_mod() Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 04/12] net: usb: don't write directly to netdev->dev_addr Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 05/12] fddi: defxx,defza: use dev_addr_set() Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 06/12] fddi: skfp: constify and " Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 07/12] net: fjes: constify and use eth_hw_addr_set() Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 08/12] net: hippi: use dev_addr_set() Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 09/12] net: s390: constify and use eth_hw_addr_set() Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 10/12] net: plip: " Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 11/12] net: sb1000,rionet: " Jakub Kicinski
2021-10-21 13:12 ` [PATCH net-next v2 12/12] net: hldc_fr: use dev_addr_set() Jakub Kicinski
2021-10-22  6:22   ` Krzysztof Hałasa [this message]
2021-10-22 17:20 ` [PATCH net-next v2 00/12] net: don't write directly to netdev->dev_addr patchwork-bot+netdevbpf

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=m3fsstd1f3.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 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).