Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2471610rwd; Wed, 14 Jun 2023 03:23:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SBxxFD0hQxoqISBnU4d5d04JQw1eoP9A69iNjdmFArwegmJWnEZtu7n671umHA//WeL8Q X-Received: by 2002:a05:6359:d1f:b0:12b:c4b7:6494 with SMTP id gp31-20020a0563590d1f00b0012bc4b76494mr6930655rwb.2.1686738234905; Wed, 14 Jun 2023 03:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686738234; cv=none; d=google.com; s=arc-20160816; b=VpGySOZPQD8MDYu8NlePYVMLtV5vv3yaBBKvkqczHl5Q26SVfXTKvc5RQ4eL/HuiM1 Yz9tqzFa1J8jvD4CR01o+f9p4nmuqAJ6bYZPLdxe32gLHgu0nazco/3txn6ooc6/kNoW 4v78evX+TiVAHuils9wvnTjXCKmvNtWMOoJLewBl5vYhR/j4RScNlcZODNTVFMUJ28Il XAlBgS5yVUQpdfTSQEBkV1HmjLxpofkPyL6PVJVpK/Eva+6Yoss5xPbpUbJjSKgbLKD+ ex6P+uI6fNJ9iTVppvVWpUkJ46Tvcg8IQ7cPh4b90cWuAD8z3Od9oLrrGvERRM3BAtn+ anHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iFsvYPvQkajYLTBSl+GGXtHGsI9rPc41gAMCUtzgEHM=; b=thyxsH7e8Z3ckGJ9XUy6ZpYZhpLJKoOtRViMwwQQ2pl2mQ64xJtgefAtUGlbhsx4pE DR/a9OtSQZF8hNba7L4h6BiRy20XtwFwdHmV8UnU+jK0VYl+7frMjzTT60XF8cW50hGe 47gwJ5i/wS/bU5Ig4cT7qdlCh7hQlwRGMWYTcOVPen04Byx5bBD04pltdIDypg21c9K/ sm2P31rsh/DtlpzLps0JjrwjRk+AvEuFPIjs8Qfb9T1IpMI6fg+dpy44RZ3S69oVO5M9 pZyh1TgY0Pj/jLqOK6zgbTLWjq6jrAh3ZG1KffFKr3xG2AxPSNEbgHOTK83tyIbw8h9g VrEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nTQcRXDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p19-20020a637413000000b0054fdfd26dffsi262170pgc.337.2023.06.14.03.23.42; Wed, 14 Jun 2023 03:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nTQcRXDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241310AbjFNKGz (ORCPT + 99 others); Wed, 14 Jun 2023 06:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243801AbjFNKG3 (ORCPT ); Wed, 14 Jun 2023 06:06:29 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DD5D18C; Wed, 14 Jun 2023 03:06:23 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35EA63fU127468; Wed, 14 Jun 2023 05:06:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686737163; bh=iFsvYPvQkajYLTBSl+GGXtHGsI9rPc41gAMCUtzgEHM=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=nTQcRXDu5YPj1KsBQnn2WQb2YHsKHQLRXwKOYwVpECkVYYVrzWEoIDKZoeKf71ztK h31c9iUTerCplmwMWnUWKR7FxYPLXlU3Dpp1QPOgXgkg1P6ONfGiePo0nWB7bi8R7T KVYM7xTVHv+GOGie5XqKqbmWRXlgI1BLFI02P6RY= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35EA62tu067285 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Jun 2023 05:06:03 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 14 Jun 2023 05:06:02 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 14 Jun 2023 05:06:02 -0500 Received: from [10.24.69.79] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35EA5xFf015594; Wed, 14 Jun 2023 05:06:00 -0500 Message-ID: <527454c6-7516-c226-dae6-636eea698353@ti.com> Date: Wed, 14 Jun 2023 15:35:59 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] net: hsr: Disable promiscuous mode in offload mode Content-Language: en-US To: Paolo Abeni , , , , CC: , , References: <20230612093933.13267-1-r-gunasekaran@ti.com> From: Ravi Gunasekaran In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/14/23 3:14 PM, Paolo Abeni wrote: > On Wed, 2023-06-14 at 11:42 +0200, Paolo Abeni wrote: >> On Mon, 2023-06-12 at 15:09 +0530, Ravi Gunasekaran wrote: >>> When port-to-port forwarding for interfaces in HSR node is enabled, >>> disable promiscuous mode since L2 frame forward happens at the >>> offloaded hardware. >>> >>> Signed-off-by: Ravi Gunasekaran >>> --- >>> net/hsr/hsr_device.c | 5 +++++ >>> net/hsr/hsr_main.h | 1 + >>> net/hsr/hsr_slave.c | 15 +++++++++++---- >>> 3 files changed, 17 insertions(+), 4 deletions(-) >>> >>> diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c >>> index 5a236aae2366..306f942c3b28 100644 >>> --- a/net/hsr/hsr_device.c >>> +++ b/net/hsr/hsr_device.c >>> @@ -531,6 +531,11 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2], >>> if (res) >>> goto err_add_master; >>> >>> + /* HSR forwarding offload supported in lower device? */ >>> + if ((slave[0]->features & NETIF_F_HW_HSR_FWD) && >>> + (slave[1]->features & NETIF_F_HW_HSR_FWD)) >>> + hsr->fwd_offloaded = true; >>> + >>> res = register_netdevice(hsr_dev); >>> if (res) >>> goto err_unregister; >>> diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h >>> index 5584c80a5c79..0225fabbe6d1 100644 >>> --- a/net/hsr/hsr_main.h >>> +++ b/net/hsr/hsr_main.h >>> @@ -195,6 +195,7 @@ struct hsr_priv { >>> struct hsr_self_node __rcu *self_node; /* MACs of slaves */ >>> struct timer_list announce_timer; /* Supervision frame dispatch */ >>> struct timer_list prune_timer; >>> + unsigned int fwd_offloaded : 1; /* Forwarding offloaded to HW */ >> >> Please use plain 'bool' instead. >> >> Also there is an hole in 'struct hsr_priv' just after 'net_id', you >> could consider moving this new field there. > > Oops, I almost forgot! Please include the target tree (net-next in this > case) in the subj prefix on your next submission. > I will take care of this from next submission onwards. > Thanks, > > Paolo > -- Regards, Ravi