Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1168640ybi; Fri, 31 May 2019 15:11:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiTPMXlzahwa5w1IBqoFfYKHM0c1NNgSApkHxIdpq6J1H6DM3KHQbxtHg8ltERVpJgRLev X-Received: by 2002:a17:902:a9cc:: with SMTP id b12mr11914380plr.96.1559340664702; Fri, 31 May 2019 15:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559340664; cv=none; d=google.com; s=arc-20160816; b=au7bqM0d7kJQYT+dRr9buAVCXMzJeUqXif7R6bXpkTXo8QLR4E7BrVodfypI2GYmQn +X83Iz/3wr3yYTx1A72auD2nF2SfGOSF10w8dK4HtcAItyRYofKME8UcF73CePygRwWO FiJnvtGWnZb1sQafvISXrjfizpSizGaGNh5oTj/dby7c3QbqVZKFApBVO0nYYcjX5SEX O5S31ifrjM50xiS6xNoZzaWh17zOdQUtBNFC/Zeq/mZy/Bm9mkOjqgf5b0EX+wsbKt56 ABq8T24zgq1GC9UhgUxCHY8R7pGAnQe+FFREd9cW2B6qj6jfoP/Dbsovh5Psy/dFYsUe gFig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=rk8vi2GT1Kz6DVRVbKN7nB2fCQvo4oUTFPvog4etFog=; b=N7/XjuVvasnn+munHS5pYyMFfhvO8EISiCZIcSmh/5D4F/a3bQkTKUpFDWJFQdpfx5 m4Q56THmYFbWTMk4evHd1/HCuSWCVk9v/kmsAs1kzOQPcAfqxLLVME8lB3SFEvlbDNok Deuju17wOpeHbw8U9UCeRnxangzqSKozFWc/ONPMSWq085L8ezICUEPar9WsOZSG2rK3 qyOF8nnS43dA7SOLjs+SlpKCnmbmZwm20q4Rq/kgNEZHlfOS+9oAKOeKoiRFHt9ePrTK joUsPrrHJxsWKpb80kuT5KEPUCOsEWvWxpL4fzZePa+F0pD1IYwkA9s/phWlv4b1Yw1k bLJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RoAJZNVM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si8023971ple.370.2019.05.31.15.10.48; Fri, 31 May 2019 15:11:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RoAJZNVM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbfEaWIo (ORCPT + 99 others); Fri, 31 May 2019 18:08:44 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:35373 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbfEaWIo (ORCPT ); Fri, 31 May 2019 18:08:44 -0400 Received: by mail-it1-f194.google.com with SMTP id u186so17754856ith.0 for ; Fri, 31 May 2019 15:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rk8vi2GT1Kz6DVRVbKN7nB2fCQvo4oUTFPvog4etFog=; b=RoAJZNVM9UNtsbDZIxdhytc/h/nYGp4cX/w7asLBFt+LL3YGdpSFVdLJ/u8wre27ep Zc72jhZEh9jdHPOl1iKQZqxVWeScamm/sKR1VLGzQx1nnXuZI+0MZf4kU+I8mYs+b6aU 0reiCICEaCdyO23EgeaBnKv2ESrzeKJv8FFJmVeneKkyZKYZjb41UYFYC3JxzhU0ZMM7 mLAEUPHlWqUQcTH3HrhRi39Dwvdc2zpwscy8iKNdbA6tJrTqOdtBEbVvoizFMbfRjwcl RcsfdbcOMjq7AKJqPUOpZehjtHVamaPcM26USwWACHuapHEqvJjFXNLfN3dULvKiJkcX SNdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=rk8vi2GT1Kz6DVRVbKN7nB2fCQvo4oUTFPvog4etFog=; b=ZFNhrPKL530yTiz7CSA8hBymzm5qoTMKWtjLYIlN04PKdKjbbKQ2fZtc1ZkzPR2W6Q Llvpp+IYOaMKxlN2UXd7nbvN2EmVpgMXd9UcjjD/DHmYSunk293IW2HozeDgJ9QDUdBg KSb6N1018nUiGu1MJGR+bCRp7RJGUeC7BbdH3ruZHhEiQTm5F7ovd11WfwwL/da6rjd4 0NqzQzXIWMa+3WzGWEGcWmgI/1tQMLQxdh5vzsmWfQTn4h0+DZuS9da3IeVviKWQteWc 3S8qPMgWtjXUqrbQ8dDH56oqFME6SLi41latPoVuUFN8oVLaTWy83zx0rjQOeuibuq6j yqMQ== X-Gm-Message-State: APjAAAWSI7CHVKsMmwN+pUT4Gwc8VNKF05G8R+swpRcgnfcgs3cbb6i7 cSnkLdSH67dLkkXR5t7zLu8CRQ== X-Received: by 2002:a02:b817:: with SMTP id o23mr8340150jam.134.1559340522683; Fri, 31 May 2019 15:08:42 -0700 (PDT) Received: from [172.22.22.26] (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.googlemail.com with ESMTPSA id p11sm3398687itc.2.2019.05.31.15.08.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 15:08:42 -0700 (PDT) Subject: Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver To: Arnd Bergmann Cc: Dan Williams , David Miller , Bjorn Andersson , Ilias Apalodimas , evgreen@chromium.org, Ben Chan , Eric Caruso , cpratapa@codeaurora.org, syadagir@codeaurora.org, Subash Abhinov Kasiviswanathan , abhishek.esse@gmail.com, Networking , DTML , Linux Kernel Mailing List , linux-soc@vger.kernel.org, Linux ARM , linux-arm-msm@vger.kernel.org References: <20190531035348.7194-1-elder@linaro.org> <065c95a8-7b17-495d-f225-36c46faccdd7@linaro.org> From: Alex Elder Message-ID: <5ebccdbe-479d-2b7d-693c-0c412060d687@linaro.org> Date: Fri, 31 May 2019 17:08:40 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/19 4:12 PM, Arnd Bergmann wrote: > On Fri, May 31, 2019 at 10:47 PM Alex Elder wrote: >> On 5/31/19 2:19 PM, Arnd Bergmann wrote: >>> On Fri, May 31, 2019 at 6:36 PM Alex Elder wrote: >>>> On 5/31/19 9:58 AM, Dan Williams wrote: >>>>> On Thu, 2019-05-30 at 22:53 -0500, Alex Elder wrote: >>> >>> Does this mean that IPA can only be used to back rmnet, and rmnet >>> can only be used on top of IPA, or can or both of them be combined >>> with another driver to talk to instead? >> >> No it does not mean that. >> >> As I understand it, one reason for the rmnet layer was to abstract >> the back end, which would allow using a modem, or using something >> else (a LAN?), without exposing certain details of the hardware. >> (Perhaps to support multiplexing, etc. without duplicating that >> logic in two "back-end" drivers?) >> >> To be perfectly honest, at first I thought having IPA use rmnet >> was a cargo cult thing like Dan suggested, because I didn't see >> the benefit. I now see why one would use that pass-through layer >> to handle the QMAP features. >> >> But back to your question. The other thing is that I see no >> reason the IPA couldn't present a "normal" (non QMAP) interface >> for a modem. It's something I'd really like to be able to do, >> but I can't do it without having the modem firmware change its >> configuration for these endpoints. My access to the people who >> implement the modem firmware has been very limited (something >> I hope to improve), and unless and until I can get corresponding >> changes on the modem side to implement connections that don't >> use QMAP, I can't implement such a thing. > > Why would that require firmware changes? What I was thinking > here is to turn the bits of the rmnet driver that actually do anything > interesting on the headers into a library module (or a header file > with inline functions) that can be called directly by the ipa driver, > keeping the protocol unchanged. You know, it's possible you're right about not needing firmware changes. But it has always been my impression they would be needed. Here's why. It looks like this: GSI Channel GSI Channel | | ---------- v ------- v ------------- | AP (ep)|=======| IPA |=======|(ep) Modem | ---------- ------- ------------- The AP and Modem each have IPA endpoints (ep), which use GSI channels, to communicate with the IPA. Each endpoint has configuration options (such as checksum offload). I *thought* that the configurations of the two endpoints need to be compatible (e.g., they need to agree on whether they're aggregating). But with your questioning I now think you may be right, that only the local endpoint's configuration matters. I will inquire further on this. I *know* that the AP and modem exchange some information about IPA configuration, but looking more closely that looks like it's all about the configuration of shared IPA resources, not endpoints. That said, the broader design (including the user space code) surely assumes rmnet, and I don't have any sense of what impact changing that would make. I am sure that changing it would not be well received. -Alex >>> Always passing data from one netdev to another both ways >>> sounds like it introduces both direct CPU overhead, and >>> problems with flow control when data gets buffered inbetween. >> >> My impression is the rmnet driver is a pretty thin layer, >> so the CPU overhead is probably not that great (though >> deaggregating a message is expensive). I agree with you >> on the flow control. > > The CPU overhead I mean is not from executing code in the > rmnet driver, but from passing packets through the network > stack between the two drivers, i.e. adding each frame to > a queue and taking it back out. I'm not sure how this ends > up working in reality but from a first look it seems like > we might bounce in an out of the softirq handler inbetween. > > Arnd >