Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp416088lqp; Wed, 12 Jun 2024 05:50:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5FXUg+UJ4UsraG8jAliJFW93bzgWY4ej1/SKLBSItetvgWm3NtOkesGAgl7cmmxerb2ag/Mb9fltgJE5eSnOVuwwWjevC0HvOQeh5jA== X-Google-Smtp-Source: AGHT+IG6ZBLISJzyeCKJn3tszYvWA4DacfpnbytmYVG9dsHqEn4Bx5p8/TTdSmcX1PqcI8Lij1c2 X-Received: by 2002:a17:906:328f:b0:a6f:4ebd:1463 with SMTP id a640c23a62f3a-a6f4ebd1d37mr25556666b.20.1718196601518; Wed, 12 Jun 2024 05:50:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718196601; cv=pass; d=google.com; s=arc-20160816; b=jasfn8+3IwY7v6gOITbN1iJicXAB7enjPwbv81Y5T/wN1oKsXPWgTwuevJVLU7K1yx O6nbFbRsWDRN774T/2KxPX/9BK0uugsIy8q/Z6x/HZajrd8Iw2KNpU6P7plvVyxnyTND aUhcsB8dcDH/DtD5ad1VHRr77oTYkQ7Htibgxmq/dr8reye/PYyD4UnDxiVDSZT3ZFv/ AvoeYSM5dlTML7gBHO+l713a131Iu+D949wUFjQ5zDoFZ1OPCNutGiz/A3ufVuf+3P88 rjfOd58AMpIo5Vj9bIWNsE4XCrMB+PBNbNupIxGmxvKbFiNIbrCY8qdbwlq4ARhLgnvV 6bFA== 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=sgOfJR6I9HRjTCuw21R8Npr1/hOjg/r1gb3GgfZ6fk8=; fh=JfjWiG8vHflm4i79Qo8BB2forqI0Dcs/CdKppnZberc=; b=hkT/U7pVn4qKQABvgy3KJgcXOTwpPdCBWhNrI70KdUSFfMR3L1mMKvuMhHoOjX/WXO Z6f3twdvJ93bTd/lkE+ir8pi2Ua0O70W+h5dZpiMMtF4c7D0giJn/dC3nAMxQte0J1ek VwpCTGrSiWuFMLTXWHLhQxbr5nL9mIoykDFNntOzA4Jl4mE1iDC32jaotn1JXNuI5bFO 3UHDy6DTvtK1nf0J/uBcvBAek93g6mue/3AialvFzdwpRMGrz7kGEewRsB3nGB8vitj1 t9Gz5BSyMVIWV5S87YDr3kj9mU9yIJI3z/A842z1/KMnPHDswFW1Jya8ESk+jRqJTzWe w7Zg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VKPAPZUM; 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-211514-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f20b79f35si284045066b.66.2024.06.12.05.50.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 05:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211514-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VKPAPZUM; 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-211514-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211514-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 344D31F21342 for ; Wed, 12 Jun 2024 12:50:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B178176AA5; Wed, 12 Jun 2024 12:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="VKPAPZUM" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 72584172BC1; Wed, 12 Jun 2024 12:49:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718196585; cv=none; b=a7i6zXqaWgoOWJLvQAFobUogmsIXiFYuWsNs0PiX7UX0gcZX4IRfUk0sRwnBQlIUrkZyt1jc3871XyXzbwQGlykV97Qfgr9D3SK+eR3w/KAyDh++Qu9B7885mPtpYMilLR9RzOxjz3XC29aNQj8sxH4+EalwGOcxg7s2bSXLH5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718196585; c=relaxed/simple; bh=uSLWTgjgrXF4KTlMSmgRqAQLaG/bcDMZuxXhJUdFn74=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=km1zRuvayKpjE+uIq0K3ezh6k2gA4jH6cA4N44WIw0ln5czGWpJ+7PeIli2Pps+Ec/zTHox7hLH8Rg6GmW8F6ixK54ZNsKR1e8cq7Sg2ue21wOiptjaXwBiZMCgpBcPe2fggbOLSYe9p0VEgGqbSR6J9zdaEk5iqV/n3L/Yx8Ng= 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=VKPAPZUM; arc=none smtp.client-ip=198.47.19.141 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 fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45CCmtiX107744; Wed, 12 Jun 2024 07:48:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718196535; bh=sgOfJR6I9HRjTCuw21R8Npr1/hOjg/r1gb3GgfZ6fk8=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=VKPAPZUMEL6L3Kv98Zetab95Hj8nPOD1qh/8XMeemObWF8Rklau4tNFb662JZIV13 eEdg0nsVkBgc0CbJhd2j8xi3YBzrk75l4/4ft82u/FM8enT1vLz4K55958lksjF9cg kB6isUyvtJo2xSVWfhi/AfsHiT3lGtt6AxKMwGW0= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45CCmtGa010856 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Jun 2024 07:48:55 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 12 Jun 2024 07:48:55 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE112.ent.ti.com (157.170.170.23) 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, 12 Jun 2024 07:48:55 -0500 Received: from [172.24.227.57] (linux-team-01.dhcp.ti.com [172.24.227.57]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45CCmn6g128115; Wed, 12 Jun 2024 07:48:50 -0500 Message-ID: <02df751a-dd04-4aa5-8c0f-7f8c98d7e01c@ti.com> Date: Wed, 12 Jun 2024 18:18:49 +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: [PATCH net-next v2 0/3] Introducing Intercore Virtual Ethernet (ICVE) driver To: Andrew Lunn CC: , , , , , , , , , , , , , , , , , Siddharth Vadapalli References: <20240531064006.1223417-1-y-mallik@ti.com> <8f5d2448-bfd7-48a5-be12-fb16cdc4de79@lunn.ch> Content-Language: en-US From: Yojana Mallik In-Reply-To: <8f5d2448-bfd7-48a5-be12-fb16cdc4de79@lunn.ch> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 6/2/24 21:15, Andrew Lunn wrote: > On Fri, May 31, 2024 at 12:10:03PM +0530, Yojana Mallik wrote: >> virtio-net provides a solution for virtual ethernet interface in a >> virtualized environment. >> >> There might be a use-case for traffic tunneling between heterogeneous >> processors in a non virtualized environment such as TI's AM64x that has >> Cortex A53 and Cortex R5 where Linux runs on A53 and a flavour of RTOS >> on R5(FreeRTOS) and the ethernet controller is managed by R5 and needs >> to pass some low priority data to A53. >> >> One solution for such an use case where the ethernet controller does >> not support DMA for Tx/Rx channel, could be a RPMsg based shared memory >> ethernet driver. > > virtio-net is very generic and vendor agnostic. > > Looking at icve, what is TI specific? Why not define a generic > solution which could be used for any heterogeneous system? We are > seeming more and more such systems, and there is no point everybody > re-inventing the wheel. So what i would like to see is something > similar to driver/tty/rpmsg_tty.c, a driver/net/ethernet/rpmsg_eth.c, > with good documentation of the protocol used, so that others can > implement it. And since you say you have FreeRTOS on the other end, > you could also contribute that side to FreeRTOS as well. A complete > open source solution everybody can use. > > Andrew +static struct rpmsg_device_id icve_rpmsg_id_table[] = { + { .name = "ti.icve" }, + {}, +}; +MODULE_DEVICE_TABLE(rpmsg, icve_rpmsg_id_table); + +static struct rpmsg_driver icve_rpmsg_client = { + .drv.name = KBUILD_MODNAME, + .id_table = icve_rpmsg_id_table, + .probe = icve_rpmsg_probe, + .callback = icve_rpmsg_cb, + .remove = icve_rpmsg_remove, +}; +module_rpmsg_driver(icve_rpmsg_client); + When the Linux kernel detects an rpmsg device (the communication channel), it looks for a matching driver that can handle this device with the help of name string in the icve_rpmsg_id_table in driver structure. I will change the name string to make the driver generic. Apart from the name string other entities don't look TI specific. Thank you for the suggestion to make inter-core virtual ethernet driver generic like drivers/tty/rpmsg_tty.c for a complete open source solution. I will be working on it. Regard, Yojana Mallik