From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 F356A489889 for ; Thu, 30 Jul 2026 13:02:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785416550; cv=none; b=umEs6zMu9H67i9cBTQefT7x71MRM+PihCxFQ7Wb1PfvI2etWl0KjyunMjhxQWgscgOgiwrGKoMQXd7LVbAp4rYMQ2XfEz14dOtdaoAkiIA/Kpnp0WcYV5kCApVycW/eFY1KEYqrd747abT1EBrr1+96yCveJofX0OK2GW2ISzas= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785416550; c=relaxed/simple; bh=OGfI7CQWmeTig9mlK9YWXS4MNmzUFY2veniVIJNAzm0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OJyIxhgT4UIAYOzOAvk9x3aaXrwO5ziNXjT7le4BM5t3y7bqT9nW7QNCKMhpRMaQ0YkruhKSoAZgaqIp9977zqm5JJ5gMOBQRVKlNqJLlWhDLKaGFobbwzXsae4zGDj3Zq45bN2frJ7HHcJQueqad7V48u3vbvKIiO7YZKr3wRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=wBl8/CeK; arc=none smtp.client-ip=91.218.175.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wBl8/CeK" Message-ID: <48631703-cbd9-45ba-b079-c4d94f4cf405@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1785416543; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zLMzAM2jhcBcjvUbjDVz8nPB2UWdb+PQz/+bnXZY5Sk=; b=wBl8/CeKE7+AeEZjGa6VWejw62/EHMA7eEQYOJ3nVvQ7kjaSGESyyQG4pdczMaWLVPNOEK 9xfo2BxYDy2gNs0som1K/KVC7F/IghOggkT8Ca0xYfBzDMDke2F+sXTlfEgHe7FUlq8DS1 RqCo+bpdLqximLeWFkxfXBw9iZoZVPI= Date: Thu, 30 Jul 2026 14:02:19 +0100 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next 6/7] net: dsa: netc: add PTP two-step timestamping support To: Wei Fang , "Wei Fang (OSS)" , "richardcochran@gmail.com" , Vladimir Oltean , Clark Wang , "andrew+netdev@lunn.ch" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "andrew@lunn.ch" , "olteanv@gmail.com" Cc: "chleroy@kernel.org" , "imx@lists.linux.dev" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" References: <20260728104548.3301214-1-wei.fang@oss.nxp.com> <20260728104548.3301214-7-wei.fang@oss.nxp.com> <59ecaa4e-f111-4dd4-914a-7704990ac58e@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 30/07/2026 02:31, Wei Fang wrote: >>> +int netc_get_ts_info(struct dsa_switch *ds, int port, >>> + struct kernel_ethtool_ts_info *info) >>> +{ >>> + struct netc_switch *priv = ds->priv; >>> + >>> + info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | >>> + SOF_TIMESTAMPING_RX_SOFTWARE | >>> + SOF_TIMESTAMPING_SOFTWARE; >> >> SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_SOFTWARE >> are available >> by default, no need to add them. > > Yes, you are right, I will remove them. > >> >> the code doesn't have skb_tx_timestamp() calls, I wonder how is >> SOF_TIMESTAMPING_TX_SOFTWARE implemented? > > The switch and the conduit port (ENETC) are integrated into the NETC IP, > so the switch can only connect to the ENETC MAC. And the ENETC driver > calls skb_tx_timestamp() unconditionally, so I thought > SOF_TIMESTAMPING_TX_SOFTWARE can be added. I checked the existing > DSA drivers and found no drivers set this flag, maybe I should remove this > flag as well. Thanks. well, you have the hardware, you can actually check if enetc driver provides it for you > >> >>> + >>> + info->phc_index = netc_get_phc_index(priv); >>> + if (info->phc_index < 0) >>> + return 0; >>> + >>> + info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE | >>> + SOF_TIMESTAMPING_RX_HARDWARE | >>> + SOF_TIMESTAMPING_RAW_HARDWARE; >>> + >>> + info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON); >>> + >>> + info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | >>> + BIT(HWTSTAMP_FILTER_PTP_V2_EVENT) | >>> + BIT(HWTSTAMP_FILTER_PTP_V2_L2_EVENT) | >>> + BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT); >>> + >>> + return 0; >>> +} >> >