From patchwork Wed Nov 30 19:37:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerhard Engleder X-Patchwork-Id: 13060318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7874C4321E for ; Wed, 30 Nov 2022 19:37:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbiK3ThT (ORCPT ); Wed, 30 Nov 2022 14:37:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiK3ThR (ORCPT ); Wed, 30 Nov 2022 14:37:17 -0500 Received: from mx03lb.world4you.com (mx03lb.world4you.com [81.19.149.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C82388BD12 for ; Wed, 30 Nov 2022 11:37:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=engleder-embedded.com; s=dkim11; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yaYUfPPM8H+RK/Msk66vVvjV6vxTWqZGz+BcY/oCcS0=; b=VTI9J6gSPTlaK6cTryCs/m9si7 Q0VtM5XlrBggVkaXqWfwXh+OZpMDBjfUIV8yvf66nmgI9SPhyh6lG8VDmAssbMCsarA9gM6Br04X7 +DlHzrJSkZOgfn3O74zuFS61HF1XeQbO6mTT3HJCXXch98qnNJAbW+6gDOxlWYoR2JeE=; Received: from [88.117.56.227] (helo=hornet.engleder.at) by mx03lb.world4you.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p0StM-0004tu-6d; Wed, 30 Nov 2022 20:37:12 +0100 From: Gerhard Engleder To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, Gerhard Engleder Subject: [PATCH net-next v2 0/4] tsnep: Throttle interrupts, RX buffer allocation and ethtool_get_channels() Date: Wed, 30 Nov 2022 20:37:04 +0100 Message-Id: <20221130193708.70747-1-gerhard@engleder-embedded.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-AV-Do-Run: Yes Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Collection of improvements found during development of XDP support. Hopefully the last patch series before the XDP support. ethtool_get_channels() is needed for automatic TAPRIO configuration in combination with multiple queues. Rework of the RX buffer allocation is prework of XDP. It ensures that packets are only dropped if RX queue would otherwise run empty because of failed allocations. So it should reduce the number of dropped packets under low memory conditions. v2: - post rotten packet fix separately (Jakub Kicinski) - implement ethtool::get_coalesce / set_coalesce (Jakub Kicinski) Gerhard Engleder (4): tsnep: Consistent naming of struct net_device tsnep: Add ethtool::get_channels support tsnep: Throttle interrupts tsnep: Rework RX buffer allocation drivers/net/ethernet/engleder/tsnep.h | 8 + drivers/net/ethernet/engleder/tsnep_ethtool.c | 165 +++++++++++- drivers/net/ethernet/engleder/tsnep_hw.h | 7 + drivers/net/ethernet/engleder/tsnep_main.c | 245 ++++++++++++------ 4 files changed, 345 insertions(+), 80 deletions(-)