Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3715223pxb; Fri, 4 Feb 2022 14:55:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmvguXS3sdMh134pVqgA4st+p0bNHsZ+TEANZnoiMK2+H2oJNCA3UxlLGStWSVyUfBAU36 X-Received: by 2002:a17:906:9251:: with SMTP id c17mr345130ejx.479.1644015350224; Fri, 04 Feb 2022 14:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644015350; cv=none; d=google.com; s=arc-20160816; b=C5Y3ztMPRT0gScn/8BHEVd6KIxWXPtuiADwQXX+pUAq6tzs7KBJIjp440Toc/xaRYA 7DlnTx0gWUZn7RzlEwNHUrs7ULUjU7Jp1T/jW2//bYothbUXuBQSfeGRs+EakHBfo+fY 4TnU7Fpe8HKA0tcR8C2GEoBJen0TSmlSUPi+U70b1VKLw//bTREKr2BY8sJM3rcUuHPm KDt+A9COzd0pwwC5XQc1cs1tFD2Li7pQUNkF1+ZTziTpBQZ6InMEEhsKVUfQr1IZ0OXE sKCei/1OLrm6w8DvG4p14YFYbjP01ONXQdla2mHWnuJ7Am3nms/0A3Y0balyDgkE3/LM LkCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tAfEVLznrjK0PtYMLtCgziZc4mTACQEXidJQ/KE2jWY=; b=j7a9BvWTJ/kKPfCDD4JdMfJbQwL48z7gG12PsLUDZSrD8pbiyjdX5ow3JzEas77EK2 ltcCyp+sGIUJS4c2ItLsLRb2gYi5doJMjBLpp1rdz3MaEjpPAN80LHGupGS6zdh+LW8Y mq+xMq3cOoWywlqSOsbtEcRVo2XnPUCikmdxBjQmFvV0Y+vSEVt2HStPwzfAJouKYqKi W8/qHSyUDxepC1la9O4OfHTkQsquToIv5/9Q2H+l2EWPtwCC0VSgvRN0pWYrZsuuu5zk g/5VVsaOH6Y9qX3zXAgBhMvrUbOVHusKiqn2+W3QgONFXvXLjr6LJGH7qKZZJDyl4O+b Nr5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yZXqiS+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7si1011049edy.351.2022.02.04.14.55.25; Fri, 04 Feb 2022 14:55:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yZXqiS+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1352621AbiBCRKQ (ORCPT + 99 others); Thu, 3 Feb 2022 12:10:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344834AbiBCRJq (ORCPT ); Thu, 3 Feb 2022 12:09:46 -0500 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96126C061401 for ; Thu, 3 Feb 2022 09:09:45 -0800 (PST) Received: by mail-io1-xd36.google.com with SMTP id e79so4011699iof.13 for ; Thu, 03 Feb 2022 09:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tAfEVLznrjK0PtYMLtCgziZc4mTACQEXidJQ/KE2jWY=; b=yZXqiS+hm8Gx5qlSKY/A/sgA85RRPqOyySx9Zj/R3KCPmp6dflOWos+SEuayk2GODs gdOKNDI+EaJFQ1EHQ0l65g/3YAFZtQ2eYHhvcTKqgo0kgcxlxT3AJhvCuRGxLkXrqgNb CeT0N8fx3mScLoWIEePe6bBzzHRmCyEjLflzV3l7Cu+FACOFzxXDJS2x+1i9sSuZVSof b0NT+dH7N4ftYE3FMORiF6H2QlfUQ0G5cQL0sNR9QQ62vbkX5i5lsEc0IwLItG2+3Xr3 Qw1F0GkzpMp12qMTm8xNDg8uAQO0KJXb2n4qhMleKoTKM1mZTH1WhNEgLZuHFyq5ta/0 4BXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tAfEVLznrjK0PtYMLtCgziZc4mTACQEXidJQ/KE2jWY=; b=RwTrXT0J8R4EsP4Y8C+ApysAlWG3eykU3RudSccnJqG0csZKVeB3RZc9uHLHVb4eHH AyqJ3Nj21P3LVcvGzmjfaSMwvm5g8ttm/EnmioisOfIKybrllRa0j5ekL0mQ1uZLGqCG gROq7nLiR7Iz7T6kNfQmNjYlQMLKl4oeWjYFsMO4EoPTKUbMAB+QpEiq5CncFTn3QeG3 gYY7Zxy0L4NSto8D5x7d7B93H/xpAKd3ut4eK+Z9OXt9jGRyVnn8PhyDggc6fqZAI207 +IEYQLaAHKTiUir6/VNHvfoFQaMCuR8xCLap1DZftNJpHJ+cvwpWs2HGiPXQBdU08A16 9mCQ== X-Gm-Message-State: AOAM530UuO222g6EFzuOA8K2qH1PJxblgkrPHrf56REvFnKRu0yz4HTH hQbqcXG8wQrY5IchiKuRR0mdtQ== X-Received: by 2002:a02:6303:: with SMTP id j3mr18506808jac.292.1643908184957; Thu, 03 Feb 2022 09:09:44 -0800 (PST) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id m12sm21869671iow.54.2022.02.03.09.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 09:09:44 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: bjorn.andersson@linaro.org, mka@chromium.org, evgreen@chromium.org, cpratapa@codeaurora.org, avuyyuru@codeaurora.org, jponduru@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 09/10] net: ipa: replenish after delivering payload Date: Thu, 3 Feb 2022 11:09:26 -0600 Message-Id: <20220203170927.770572-10-elder@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220203170927.770572-1-elder@linaro.org> References: <20220203170927.770572-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replenishing is now solely driven by whether transactions are available for a channel, and it doesn't really matter whether we replenish before or after we deliver received packets to the network stack. Replenishing before delivering the payload adds a little latency. Eliminate that by requesting a replenish after the payload is delivered. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 9d875126a360e..a236edf5bf068 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -1341,10 +1341,8 @@ static void ipa_endpoint_rx_complete(struct ipa_endpoint *endpoint, { struct page *page; - ipa_endpoint_replenish(endpoint); - if (trans->cancelled) - return; + goto done; /* Parse or build a socket buffer using the actual received length */ page = trans->data; @@ -1352,6 +1350,8 @@ static void ipa_endpoint_rx_complete(struct ipa_endpoint *endpoint, ipa_endpoint_status_parse(endpoint, page, trans->len); else if (ipa_endpoint_skb_build(endpoint, page, trans->len)) trans->data = NULL; /* Pages have been consumed */ +done: + ipa_endpoint_replenish(endpoint); } void ipa_endpoint_trans_complete(struct ipa_endpoint *endpoint, -- 2.32.0