Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp212346rdb; Thu, 1 Feb 2024 06:36:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK3D9XGlzISBpLeXN2pBdow2VCYS4k5fgpUtzDZPYIl6waBlmcQS5LjSVKxwpBCcwMJosd X-Received: by 2002:a17:903:246:b0:1d6:fe11:2642 with SMTP id j6-20020a170903024600b001d6fe112642mr5786973plh.27.1706798178892; Thu, 01 Feb 2024 06:36:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706798178; cv=pass; d=google.com; s=arc-20160816; b=00zlC+IJl8PV2HcW2Pw28nCCRiN5AtOJ0+U4Euuy2DikNi8T/LbZGUrXS3/5JAJ8Cu jCVxnhh08gzXngb1kd+rPhDWokjKQ/HsMrPwHXKPKkGjNykkUwuTf6UVaUliHmH8SR8w CPhX9wxL8i1BQzqNvj68S856q/IGY+LVBht5hxmAINGIZHEb1parV11b/xaYSDWMbXm4 ff+pNwhOldLWbcSvxujrg73VQT9uA4I3SYF7cQxYQCY7fEf9EHwZrKbDCw3hVQhAAzuq nSGIKN6lCHzTj4Zfxr8KHAnpeJ1okaTKOia3cpgJ4N+jdcLBUsA4TN8lYEl8iiViQsrD gIsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=J6flvXpOkXawJWzN/G+NmhHzqrhF472sihVACRH/ksM=; fh=/aqENF2YSdw9nsRU75VmPvzNrmfx7npSEx53tSwxtR4=; b=KSqZ87y0aS8vFN1q74oGs1fEEfueQF/P7Gh7G2YKXICSGehF92H+IXd0GuBTFJNwa+ gYiqLMNAtNjm46GYcs6iANtuRRhSxfPdEvJ8lvvMNjYnfXmju3Q2XMDS3vb+qXyZQyPe lmYu1pZ6D+oe1U5CKVNnkzuDTmh9r309GIkNRnFSc597tSjH0k0aClzTzgfflD4kn4SA 9KTl3dqyaUSF49cw46QeNMd3dK0dHyYCfZD+OFGeT3/8u81I3ea/H+RihLtIRzSlMqOk o1XflfpfOXvCYBRV8kgwRXjxqBtvbpM4NjEiDBrwCx4Zsr7wLYZS5c5jsswgtJvvaU1x RrqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=oaocL2L0; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-48298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=1; AJvYcCVDm5z4AlSvLlj11ONZ5FUECRQLML/BwziFupJJlcGjT3UmVypBvKZvon2wASwCp7hBHDoPLcFFPnrPlQuSik9wDXbvM3E2vhc4912GyA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q6-20020a170902b10600b001d8882dd6a7si11962528plr.392.2024.02.01.06.36.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 06:36:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=oaocL2L0; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-48298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9A2B1B2403F for ; Thu, 1 Feb 2024 14:16:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D6375D498; Thu, 1 Feb 2024 14:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="oaocL2L0" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 95A835D47F; Thu, 1 Feb 2024 14:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706796959; cv=none; b=uxopQT7dE7KHITw8TwkHpUHeUNVrZaMmkb23G1rxFhac3nKKQe3dQsM37gzZndZGZDTGNR8v0aaYJ49IGpmiQ26qJicXly1edoxNofJRtVgX1ImhfZoFSMaZ1avOHRF2awWjYlt2eHsojwLUVkTwaFWULBDs9NoP8Ij2Ad2szU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706796959; c=relaxed/simple; bh=IBgH0tB27y4jumRoQMdXPm5HdwQXC8IYWeN1SNZ9N8U=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=RWhoxQG3Zkb21K4XSWlK3m+01+w64zQy8aHalLlhp6f0M35Y37Yi44eNMJEUzHe+NoD8LDlMgvjYUXksOMUBjg72VTs+ltY8rkT9Vi8p5Ih+1AcBuwibuxIdgCSqtDDLaOdN7KFD/7/OLDiI00BjqtQX8ZctR3Yf2aTD8n7dd58= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=oaocL2L0; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 411EFfZa122499; Thu, 1 Feb 2024 08:15:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706796941; bh=J6flvXpOkXawJWzN/G+NmhHzqrhF472sihVACRH/ksM=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=oaocL2L0YFB2E/M/Mx3/J+AVekeYV3/SxFQxmP03dI+IyFr1AHCTLo7qmpgXN4a4i en3Xrd/L0oem5F1g3NVcsfl/EmRXe/XQdl4DPO/Y5bMeJPle4Qyp8VYbMLoe9S1WR2 QS0OFNUhIcWkKPkw4B5vnKx04f/8Uk/UcwAT24Fw= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 411EFfv3014842 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 1 Feb 2024 08:15:41 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 1 Feb 2024 08:15:41 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE105.ent.ti.com (10.64.6.26) 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; Thu, 1 Feb 2024 08:15:41 -0600 Received: from [10.249.129.226] ([10.249.129.226]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 411EFAoe050156; Thu, 1 Feb 2024 08:15:18 -0600 Message-ID: <0ff9f349-25f1-408c-b7f8-ffad035f427e@ti.com> Date: Thu, 1 Feb 2024 19:45:05 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH net-next 1/2] net: ethernet: ti: Introduce inter-core-virt-eth as RPMsg driver To: Simon Horman CC: , , , , , , , , , , Ravi Gunasekaran References: <20240130110944.26771-1-r-gunasekaran@ti.com> <20240130110944.26771-2-r-gunasekaran@ti.com> <20240201133001.GC530335@kernel.org> Content-Language: en-US From: Ravi Gunasekaran In-Reply-To: <20240201133001.GC530335@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Simon, On 2/1/2024 7:00 PM, Simon Horman wrote: > On Tue, Jan 30, 2024 at 04:39:43PM +0530, Ravi Gunasekaran wrote: >> TI's K3 SoCs comprises heterogeneous processors (Cortex A, Cortex R). >> When the ethernet controller is completely managed by a core (Cortex R) >> running a flavor of RTOS, in a non virtualized environment, network traffic >> tunnelling between heterogeneous processors can be realized by means of >> RPMsg based shared memory ethernet driver. With the shared memory used >> for the data plane and the RPMsg end point channel used for control plane. >> >> inter-core-virt-eth driver is modelled as a RPMsg based shared >> memory ethernet driver for such an use case. >> >> As a first step, register the inter-core-virt-eth as a RPMsg driver. >> And introduce basic control messages for querying and responding. >> >> Signed-off-by: Siddharth Vadapalli >> Signed-off-by: Ravi Gunasekaran >> --- >> drivers/net/ethernet/ti/inter-core-virt-eth.c | 139 ++++++++++++++++++ >> drivers/net/ethernet/ti/inter-core-virt-eth.h | 89 +++++++++++ >> 2 files changed, 228 insertions(+) >> create mode 100644 drivers/net/ethernet/ti/inter-core-virt-eth.c >> create mode 100644 drivers/net/ethernet/ti/inter-core-virt-eth.h >> >> diff --git a/drivers/net/ethernet/ti/inter-core-virt-eth.c b/drivers/net/ethernet/ti/inter-core-virt-eth.c >> new file mode 100644 >> index 000000000000..d3b689eab1c0 >> --- /dev/null >> +++ b/drivers/net/ethernet/ti/inter-core-virt-eth.c >> @@ -0,0 +1,139 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ > Hi Ravi and Siddharth, > > The correct style for SPDX headers in .c files is a '//' comment: > > // SPDX-License-Identifier: GPL-2.0 I will fix this. >> +/* Texas Instruments K3 Inter Core Virtual Ethernet Driver >> + * >> + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ >> + */ > ... > >> diff --git a/drivers/net/ethernet/ti/inter-core-virt-eth.h b/drivers/net/ethernet/ti/inter-core-virt-eth.h > ... > >> +struct icve_common { >> + struct rpmsg_device *rpdev; >> + spinlock_t send_msg_lock; >> + spinlock_t recv_msg_lock; > Spinlocks ought to come with an comment regarding what they lock. I will add the comments as reported by checkpatch. > >> + struct message send_msg; >> + struct message recv_msg; >> + struct icve_port *port; >> + struct device *dev; >> +} __packed; >> + >> +#endif /* __INTER_CORE_VIRT_ETH_H__ */ >> -- >> 2.17.1 >> >> Ravi