From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C63484137B8 for ; Fri, 24 Jul 2026 09:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784884773; cv=none; b=kIentDRgoTKs7nBbyrsS6f0cUme7w6oIoepahhAQ86bZCVZ3K2Rtjw9t9O9NWHmXwEKKxT3snyoLk44rtdn/bUL5NUD53PhYO4f8y79tW+NdL8E3PXuMDQ3kA0XiuHF5xvjDPMRDAUhLbHlzQCZx4MdEQ7pK2zC1FqAYKpmh92E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784884773; c=relaxed/simple; bh=PYWcOUGQI/qV+I3Sq57msatzimkkj44a6fHn4N60+/g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FdhtZQDk7l4o/bYobCxLxr5PvL3/0HxydH7rsASBNZCTm0EIIEJqmThnLywicixCwhaq6mCVno9M7OdkgmSO09ziZLOn29+S1HNTv2PfOc0cBUhs9hpy7MQ9cm2tNpPvDcuFQHrkRhd//9Sw1BeTj3ME+5qUfj8xfifXRXyTv7I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OS1DfVJc; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OS1DfVJc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784884760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WW6AA/KhYeCHhjUnFN4/a/hB2xx19YHfi5X9x9L31wo=; b=OS1DfVJcOyreCuLk9twKP+vB9dfdbIT1ZpgmuSP0rRS4oOWQLJA+06tcRVJgU5UW5GJB6a XfLNZlpX+3CA058AknzgGCrUnFWNHx62BXVRo7DS5wBccuTxUfY3zREF4tQHPOHCbyfLlm us0qNlYWmva2WJRrrPSdXH9fZVyX6nY= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-jpUzTDYtPMmpkyEuGyllxQ-1; Fri, 24 Jul 2026 05:19:16 -0400 X-MC-Unique: jpUzTDYtPMmpkyEuGyllxQ-1 X-Mimecast-MFC-AGG-ID: jpUzTDYtPMmpkyEuGyllxQ_1784884755 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E9EBD1955DC3; Fri, 24 Jul 2026 09:19:14 +0000 (UTC) Received: from thinkpad (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8E39F1954227; Fri, 24 Jul 2026 09:19:12 +0000 (UTC) Date: Fri, 24 Jul 2026 11:19:09 +0200 From: Felix Maurer To: Aravind Krishna Cc: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, horms@kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hsr: prp: honor master promisc mode for local delivery with macvlan Message-ID: References: <20260722041629.657330-1-aravindkrishhna@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260722041629.657330-1-aravindkrishhna@gmail.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Hi Aravind, On Wed, Jul 22, 2026 at 09:46:29AM +0530, Aravind Krishna wrote: > When running MACVLAN over PRP, packets can be expected to be delivered > to the local stack when the PRP/HSR master is in promiscuous mode. > > Update local destination handling in check_local_dest() so that if the > master device exists and has IFF_PROMISC set, the packet is marked > PACKET_HOST and treated as local destination. > > This enables expected receive behavior for MACVLAN over PRP setups. > > Signed-off-by: Aravind-kris Thank you for your patch! For future submissions, please follow the netdev guidelines [1], in particular please: - add the target tree to the subject, - run scripts/checkpatch.pl on your patches before submission, - follow the kernel / netdev code style (checkpatch will catch a lot of that but not necessarily everything). Now, for your patch contents: IIUC, you want to create a macvlan interface on top of an hsr interface in PRP mode. I am not sure if this is something we should support at all. At least, it is not as simple as forwarding all traffic to the stack. HSR and PRP both require pretty special handling of MAC addresses. The whole hsr code relies on knowing the MAC address of the local interface (and that is a single address at the moment). Also, an HSR/PRP node is expected to send supervision frames containing its address. These wouldn't be sent for the macvlan addresses at all at the moment. Can you go a bit into detail on what is your use case? Maybe we can make that possible in another way. For example, the usual way to add more "devices" (physical or virtual) behind a HSR/PRP node would be a RedBox. We already support that for HSR and there is somebody working on support for PRP. Thanks, Felix [1]: https://docs.kernel.org/process/maintainer-netdev.html > --- > net/hsr/hsr_forward.c | 22 ++++++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > > diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c > index 0774981a65c1..38ed6b09fc4a 100644 > --- a/net/hsr/hsr_forward.c > +++ b/net/hsr/hsr_forward.c > @@ -589,6 +589,8 @@ static void hsr_forward_do(struct hsr_frame_info *frame) > static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb, > struct hsr_frame_info *frame) > { > + struct hsr_port *master; > + > if (hsr_addr_is_self(hsr, eth_hdr(skb)->h_dest)) { > frame->is_local_exclusive = true; > skb->pkt_type = PACKET_HOST; > @@ -600,8 +602,24 @@ static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb, > skb->pkt_type == PACKET_MULTICAST || > skb->pkt_type == PACKET_BROADCAST) { > frame->is_local_dest = true; > - } else { > - frame->is_local_dest = false; > + } > + else > + { > + master = hsr_port_get_hsr(hsr, HSR_PT_MASTER); > + > + if (!master || !master->dev) > + { > + frame->is_local_dest = false; > + } > + else if (master->dev->flags & IFF_PROMISC) > + { > + skb->pkt_type = PACKET_HOST; > + frame->is_local_dest = true; > + } > + else > + { > + frame->is_local_dest = false; > + } > } > } > > -- > 2.34.1 >