linux/drivers/net/ethernet/intel/idpf
Emil Tantilov acf3a5c8be 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: ce1b75d063 ("idpf: add ptypes and MAC filter support")
Reported-by: Jian Liu <jianliu@redhat.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-09-02 11:05:51 -07:00
..
Kconfig idpf: add initial PTP support 2025-05-16 09:13:02 -07:00
Makefile idpf: implement core RDMA auxiliary dev create, init, and destroy 2025-07-14 10:57:51 -07:00
idpf.h idpf: preserve coalescing settings across resets 2025-07-18 09:02:27 -07:00
idpf_controlq.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux 2025-07-17 12:24:00 +02:00
idpf_controlq.h idpf: implement get LAN MMIO memory regions 2025-07-14 10:57:51 -07:00
idpf_controlq_api.h idpf: convert control queue mutex to a spinlock 2025-07-01 08:25:01 -07:00
idpf_controlq_setup.c idpf: add controlq init and reset checks 2023-09-13 14:59:23 -07:00
idpf_dev.c idpf: implement get LAN MMIO memory regions 2025-07-14 10:57:51 -07:00
idpf_devids.h
idpf_ethtool.c idpf: preserve coalescing settings across resets 2025-07-18 09:02:27 -07:00
idpf_idc.c idpf: fix UAF in RDMA core aux dev deinitialization 2025-09-02 11:05:51 -07:00
idpf_lan_pf_regs.h idpf: negotiate PTP capabilities and get PTP clock 2025-05-16 09:13:02 -07:00
idpf_lan_txrx.h idpf: add Tx timestamp flows 2025-05-16 09:13:02 -07:00
idpf_lan_vf_regs.h idpf: initialize interrupts and enable vport 2023-09-13 14:59:24 -07:00
idpf_lib.c idpf: set mac type when adding and removing MAC filters 2025-09-02 11:05:51 -07:00
idpf_main.c idpf: preserve coalescing settings across resets 2025-07-18 09:02:27 -07:00
idpf_mem.h idpf: implement get LAN MMIO memory regions 2025-07-14 10:57:51 -07:00
idpf_ptp.c idpf: add cross timestamping 2025-07-18 09:02:27 -07:00
idpf_ptp.h idpf: add cross timestamping 2025-07-18 09:02:27 -07:00
idpf_singleq_txrx.c idpf: stop Tx if there are insufficient buffer resources 2025-08-21 09:42:39 -07:00
idpf_txrx.c idpf: remove obsolete stashing code 2025-08-21 09:42:39 -07:00
idpf_txrx.h idpf: remove obsolete stashing code 2025-08-21 09:42:39 -07:00
idpf_vf_dev.c idpf: implement get LAN MMIO memory regions 2025-07-14 10:57:51 -07:00
idpf_virtchnl.c idpf: set mac type when adding and removing MAC filters 2025-09-02 11:05:51 -07:00
idpf_virtchnl.h idpf: add flow steering support 2025-07-18 09:02:27 -07:00
idpf_virtchnl_ptp.c idpf: add cross timestamping 2025-07-18 09:02:27 -07:00
virtchnl2.h virtchnl2: add flow steering support 2025-07-18 09:02:27 -07:00
virtchnl2_lan_desc.h