[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB6297F99D91CB8144253F7FBD9B3AA@SJ1PR11MB6297.namprd11.prod.outlook.com>
Date: Fri, 29 Aug 2025 22:38:37 +0000
From: "Salin, Samuel" <samuel.salin@...el.com>
To: "Tantilov, Emil S" <emil.s.tantilov@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>, "willemb@...gle.com"
<willemb@...gle.com>, "decot@...gle.com" <decot@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Hay, Joshua A"
<joshua.a.hay@...el.com>, "Loktionov, Aleksandr"
<aleksandr.loktionov@...el.com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "edumazet@...gle.com" <edumazet@...gle.com>,
"jianliu@...hat.com" <jianliu@...hat.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>, "davem@...emloft.net"
<davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net v3] idpf: set mac type when
adding and removing MAC filters
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Emil Tantilov
> Sent: Thursday, August 14, 2025 4:43 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: pmenzel@...gen.mpg.de; willemb@...gle.com; decot@...gle.com;
> netdev@...r.kernel.org; Hay, Joshua A <joshua.a.hay@...el.com>; Loktionov,
> Aleksandr <aleksandr.loktionov@...el.com>; andrew+netdev@...n.ch;
> edumazet@...gle.com; jianliu@...hat.com; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>; kuba@...nel.org; pabeni@...hat.com;
> davem@...emloft.net
> Subject: [Intel-wired-lan] [PATCH iwl-net v3] idpf: set mac type when adding
> and removing MAC filters
>
> On control planes that allow changing the MAC address of the interface, the
> driver must provide a MAC type to avoid errors such as:
>
> idpf 0000:0a:00.0: Transaction failed (op 535) idpf 0000:0a:00.0: Received
> invalid MAC filter payload (op 535) (len 0) idpf 0000:0a:00.0: Transaction
> failed (op 536)
>
> These errors occur during driver load or when changing the MAC via:
> ip link set <iface> address <mac>
>
> Add logic to set the MAC type when sending ADD/DEL (opcodes 535/536) to
> the control plane. Since only one primary MAC is supported per vport, the
> driver only needs to send an ADD opcode when setting it. Remove the old
> address by calling __idpf_del_mac_filter(), which skips the message and just
> clears the entry from the internal list. This avoids an error on DEL as it attempts
> to remove an address already cleared by the preceding ADD opcode.
>
> Fixes: ce1b75d0635c ("idpf: add ptypes and MAC filter support")
> Reported-by: Jian Liu <jianliu@...hat.com>
> Signed-off-by: Emil Tantilov <emil.s.tantilov@...el.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Reviewed-by: Paul Menzel <pmenzel@...gen.mpg.de>
> ---
> Changelog:
> v3:
> - Update the commit message to clarify the change in logic from ADD/DEL
> to just ADD in idpf_set_mac() is to avoid another case where the control
> plane will
> return an error.
> - s/old_address/old_mac_address/g
> - Refactored idpf_set_mac_type() to use ternary operator for setting
> the MAC type based on whether the address is primary or not.
>
> v2:
> - Make sure to clear the primary MAC from the internal list, following
> successful change.
> - Update the description to include the error on 536 opcode and
> mention the removal of the old address.
>
> v1:
> https://lore.kernel.org/intel-wired-lan/20250806192130.3197-1-
> emil.s.tantilov@...el.com/
> ---
> 2.37.3
Tested-by: Samuel Salin <Samuel.salin@...el.com>
Powered by blists - more mailing lists