mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Martitz <t.martitz@fritz.com>
To: Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 0/1] macvlan: allow source mode devices along with passthru
Date: Thu, 17 Sep 2026 14:29:31 +0200	[thread overview]
Message-ID: <d17cbd3e-d373-452c-9a7d-dd6d5a413565@fritz.com> (raw)
In-Reply-To: <20260917100258.2582568-1-t.martitz@fritz.com>

Hello,

Apologize for forgetting a changelog entry. I'm adding it inline and hopefully don't
forget include it in the next posting (if any).

BTW: I'll be attending at LPC in Prague. Would be great to have a chat with your guys there.

Am 17.09.26 um 12:02 schrieb Thomas Martitz:
> Hello,
> 
> we're trying to solve a use case on our devices where two SoC are
> connected on the same board, using the only available high-speed interface.
> 
> One SoC runs the main Linux system including the full routing stack
> (FRITZ!OS) and the other SoC implements most of the GPON ONT side.
> 
> The high-speed interface is of course also used for the user traffic.
> Therefore we must tell the inter-SoC traffic apart from the user traffic.
> 
> We achieve this by matching the well-known MAC address of the ONT SoC.
> The user traffic passes through the ONT SoC without modifying MAC headers.
> Now we would like to use macvlan (with source mode devices) on the main
> SoC side for this but our routing stack requires the rx_handler to be
> available. Therefore macvlan is currently not an option.
> 
> With this patch macvlan becomes an option because the current limitation
> of either "one passthru device" or "any other configuration" is relaxed
> for the combination of passthru and any number of source mode devices.
> 
> This allows us to configure a source mode device for the other SoC and
> register an rx_handler for further processing on the passthru device.
> 
> Thanks in advance!
> 
---
Changes in v5
- Properly respect "macvlan_addr_busy()" again for non-passthru  interfaces (and avoid calling anymore for passthru interfaces)
- Guard NETDEV_CHANGEADDR from messing with the lower device
  address during passthru interface removal
- restore unicast address (dev_add_uc/_del_uc) handling> Changes in v4
> - Prevent macvlan_restore_mac() from changing the MAC address
>   of remaining source mode interfaces.
> - Set MACVLAN_F_PASSTHRU on the macvlan_port only after adding
>   the passthru interface truly succeeds.
> - Changing existing interfaces to passthru mode shouldn't become
>   allowed.
> 
> Changes in v3
> - fix passthru port removal caused by passing the wrong 
>   device to macvlan_port_release_mac(). This was also
>   detected by syzbot.
> - macvlan_port_release_mac() is now named macvlan_restore_mac()
>   and gets passed a "struct macvlan_port" directly.
> - Link to v2: https://lore.kernel.org/netdev/20260709100512.1383421-1-t.martitz@fritz.com/
> 
> Changes in v2:
> - changed several port-wide checks (macvlan_passthru()) to 
>   per-interface checks (vlan->mode == vlan->mode == MACVLAN_MODE_PASSTHRU)
> - correctly handle removing the passthru interface when there are still
>   source interfaces
> - Link to initial posting: https://lore.kernel.org/netdev/20260612092345.2352255-1-t.martitz@fritz.com/
> ---
> 
> Thomas Martitz (1):
>   macvlan: allow source mode devices along with passthru
> 
>  drivers/net/macvlan.c | 107 ++++++++++++++++++++++++++++--------------
>  1 file changed, 73 insertions(+), 34 deletions(-)
> 

Best regards

-- 
Thomas Martitz <t.martitz@fritz.com>
FRITZ! Technology GmbH, Berlin (Germany)

      parent reply	other threads:[~2026-09-17 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 10:02 Thomas Martitz
2026-09-17 10:10 ` [PATCH v5 1/1] " Thomas Martitz
2026-09-17 12:29 ` Thomas Martitz [this message]

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=d17cbd3e-d373-452c-9a7d-dd6d5a413565@fritz.com \
    --to=t.martitz@fritz.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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

all inboxes | Powered by JetHome®