Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp614108pxh; Tue, 9 Nov 2021 16:12:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO53MJKgiTx9NNIWm9uIwBmyw5x/77rYP5Ikyy3zmAi5U4wCKo1RSQAze3/AryS0kpsht8 X-Received: by 2002:a6b:5c02:: with SMTP id z2mr3933205ioh.138.1636503127599; Tue, 09 Nov 2021 16:12:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636503127; cv=none; d=google.com; s=arc-20160816; b=EHUK+8ZoPfJ1IzSxf5tg5bVmimdP02vQd8noXihvskkGl1c0a5QLqdTE4b3xpKaYPq cGwcI5igeVnEyKjaHvBP03lkTQNUZtLzHazh4/9nU1Ibqq3wB3LIuXTkNoz6IntrMxHH icOHQ6Yd3/aai+f1i450nec0Hp2uXt97z/91RLtwCvHR648gILRN1OWoAm5/iiyuNYYa FQu0Oj1+iJY5IzH0e8XR5z9acWFRBxuKljlqpsPvWGPMhtStJxnRuUVifvYw+V9YAdyo 4kQCFDqKBDJJZiNf7ckhOTPil+646Vur7cngNTmtPrqoTF5aT6PTZNB2Z+Ufsio45V7a 39iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=I5wTdLmlJ6yAtNAX1aGNMQtVcCvB6wAMhoGw1PgjShw=; b=fpiE3MKAE0hMM6xBcZsTa8UbjKbH1HJ5RXeYaZzYBpaq1zIc16hXg2bhzoRBrdLXYc I6hoNVYJ0ueClBcfA+ayOtjsIzXlcCuy7I32lE7zY+Id8i3cLij2f9wKXGF0e42W8aoF Kfepozkkkl1L6UlVSVavUcFRvlPRfIe+kgmeo+xNISyginajKe5qigsQmPY6tVgfa553 Iihlea/2S5WpfPqI36/PiiNfcCrntUqbc2N/XTY3adlYHGTfxgzbt2GwiUOySZHviQvk G4kOSiVUQcKYd3pXrQ+7mE8PQ9L/lCea+kYY5qQ8d0jrEDAHIWWBw6sMzkNN4P60BOUN xTNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jDZSHOQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si42340722ilo.180.2021.11.09.16.11.54; Tue, 09 Nov 2021 16:12:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jDZSHOQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242191AbhKISXY (ORCPT + 97 others); Tue, 9 Nov 2021 13:23:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242389AbhKISXN (ORCPT ); Tue, 9 Nov 2021 13:23:13 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88017C061764; Tue, 9 Nov 2021 10:20:27 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id v20so32865plo.7; Tue, 09 Nov 2021 10:20:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=I5wTdLmlJ6yAtNAX1aGNMQtVcCvB6wAMhoGw1PgjShw=; b=jDZSHOQwo+2hNDQD2WfbPe4ou0IAujUoXUBQoTO5mynEfV0iZS5IA8uH3Jwtu0rj43 i/K8bG8I98oj2qYPYpHHhlSgtuPzeONXIbDQQuBIvsI5BNZZkC8WSrp0/tVIaVeltrZy VnWc59XbHrzOSv1FZKYgZCXQvenHj7fDp8PnZDIg5V6UyatUwhb3VWxz6hRCmrBor3j+ 8xTVlumwnmvst7bRZN7iRUmOEtpSkXeMtEB568sZvL1dt5GB5yEJG8pdzGBTTIRB+EpA 2ct28FrY17iiudsMs4QEQYsSI9ZueO203f7lev4ISHpkhs3omSCOW3Wulkj/J6uO/are /Bvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I5wTdLmlJ6yAtNAX1aGNMQtVcCvB6wAMhoGw1PgjShw=; b=xDQBlf5kl+jmp6NwmdZr57TH4OWZsKeZNm3O4LArIPg32Apvt6cf0DCpBbZb1UjchX fna3Y0AJP10YDyxh63/kSxVICvbB9R7MX4CnmsKM/WRCM1oYuoCKeILGT37Tei9KbLLn v23GwZ7I+390UZhSBVDC8ZC/UOAMpvBlXoP/N6S+7QinDQKHxutHLv4w68XEdYVAMjNc nWkFT1FZF480W+KvwNVhRZvJCo78k2DD4jVissojaQhrdwzOe+ak/44Lj7Qed2TOdW76 a/o7xTtnp24IFte51KjZ5iXtmdacnqCKwK+yJkhBD4ESJMpWGZutfzmiEaD7k8xQoMNa 78oQ== X-Gm-Message-State: AOAM533fkgFRhqAHjTG1np6tm+AkYQLXBKpZ0RPrZ9WzJdypUDuNOFzA 6okCBF+iuuLD72k1xL2eBXb8gCulGFI= X-Received: by 2002:a17:90a:9d89:: with SMTP id k9mr9585117pjp.74.1636482026724; Tue, 09 Nov 2021 10:20:26 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id f130sm20142967pfa.81.2021.11.09.10.20.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Nov 2021 10:20:26 -0800 (PST) Subject: Re: [PATCH v2 2/7] net: dsa: b53: Move struct b53_device to include/linux/dsa/b53.h To: Vladimir Oltean Cc: Martin Kaistra , Andrew Lunn , Vivien Didelot , Richard Cochran , "David S. Miller" , Jakub Kicinski , John Stultz , Thomas Gleixner , Stephen Boyd , Russell King , Marc Kleine-Budde , linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20211109095013.27829-1-martin.kaistra@linutronix.de> <20211109095013.27829-3-martin.kaistra@linutronix.de> From: Florian Fainelli Message-ID: Date: Tue, 9 Nov 2021 10:20:25 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/9/21 10:15 AM, Vladimir Oltean wrote: > On Tue, 9 Nov 2021 at 20:11, Florian Fainelli wrote: >> >> On 11/9/21 10:05 AM, Florian Fainelli wrote: >>> On 11/9/21 1:50 AM, Martin Kaistra wrote: >>>> In order to access the b53 structs from net/dsa/tag_brcm.c move the >>>> definitions from drivers/net/dsa/b53/b53_priv.h to the new file >>>> include/linux/dsa/b53.h. >>>> >>>> Signed-off-by: Martin Kaistra >>>> --- >>>> drivers/net/dsa/b53/b53_priv.h | 90 +---------------------------- >>>> include/linux/dsa/b53.h | 100 +++++++++++++++++++++++++++++++++ >>>> 2 files changed, 101 insertions(+), 89 deletions(-) >>>> create mode 100644 include/linux/dsa/b53.h >>> >>> All you really access is the b53_port_hwtstamp structure within the >>> tagger, so please make it the only structure exposed to net/dsa/tag_brcm.c. >> >> You do access b53_dev in the TX part, still, I would like to find a more >> elegant solution to exposing everything here, can you create a >> b53_timecounter_cyc2time() function that is exported to modules but does >> not require exposing the b53_device to net/dsa/tag_brcm.c? >> -- >> Florian > > Switch drivers can't export symbols to tagging protocol drivers, remember? > https://lore.kernel.org/netdev/20210908220834.d7gmtnwrorhharna@skbuf/ I do now :) How about a function pointer in dsa_switch_ops that driver can hook onto? -- Florian