From patchwork Sun Apr 23 14:49:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Agroskin X-Patchwork-Id: 13221381 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 197A6C77B73 for ; Sun, 23 Apr 2023 14:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230300AbjDWOuh (ORCPT ); Sun, 23 Apr 2023 10:50:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbjDWOug (ORCPT ); Sun, 23 Apr 2023 10:50:36 -0400 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C99F211F for ; Sun, 23 Apr 2023 07:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1682261421; x=1713797421; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=A6XFtcofHS7tKM37d7nVtxPshh0Wzc2zk8UjVdCaqqs=; b=R3V3iDwIvTdmsyHKLBmbDMf2q7rOOjlpL1iDsZMIsAkVV1hrmHYY8gSB wiemt53Z3pgGnXtyXEXoPf0u91YEdt4pK2jK2RC2EHhcxxkC4TtTZQMg8 r+skafJVXcNayvntjCrinVwtft23v+7wu8fZcwpXw1xoGCx2F0dA9U7rp s=; X-IronPort-AV: E=Sophos;i="5.99,220,1677542400"; d="scan'208";a="321808425" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-m6i4x-9694bb9e.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2023 14:50:20 +0000 Received: from EX19D019EUA003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1e-m6i4x-9694bb9e.us-east-1.amazon.com (Postfix) with ESMTPS id A629080D3D; Sun, 23 Apr 2023 14:50:16 +0000 (UTC) Received: from EX19D028EUB003.ant.amazon.com (10.252.61.31) by EX19D019EUA003.ant.amazon.com (10.252.50.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Sun, 23 Apr 2023 14:50:16 +0000 Received: from u570694869fb251.ant.amazon.com (10.85.143.178) by EX19D028EUB003.ant.amazon.com (10.252.61.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Sun, 23 Apr 2023 14:50:05 +0000 From: Shay Agroskin To: Michal Kubecek , David Miller , Jakub Kicinski , CC: Shay Agroskin , "Woodhouse, David" , "Machulsky, Zorik" , "Matushevsky, Alexander" , Saeed Bshara , "Wilson, Matt" , "Liguori, Anthony" , "Bshara, Nafea" , "Belgazal, Netanel" , "Saidi, Ali" , "Herrenschmidt, Benjamin" , "Kiyanovski, Arthur" , "Dagan, Noam" , "Arinzon, David" , "Itzko, Shahar" , "Abboud, Osama" , Eric Dumazet , Paolo Abeni , Vladimir Oltean , Andrew Lunn , Johannes Berg , Edward Cree , Florian Westphal Subject: [PATCH v2 ethtool-next 0/2] Add tx push buf len param to ethtool Date: Sun, 23 Apr 2023 17:49:46 +0300 Message-ID: <20230423144948.650717-1-shayagr@amazon.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-Originating-IP: [10.85.143.178] X-ClientProxiedBy: EX19D045UWC004.ant.amazon.com (10.13.139.203) To EX19D028EUB003.ant.amazon.com (10.252.61.31) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz This patchset adds a new sub-configuration to ethtool get/set queue params (ethtool -g) called 'tx-push-buf-len'. This configuration specifies the maximum number of bytes of a transmitted packet a driver can push directly to the underlying device ('push' mode). The motivation for pushing some of the bytes to the device has the advantages of - Allowing a smart device to take fast actions based on the packet's header - Reducing latency for small packets that can be copied completely into the device This new param is practically similar to tx-copybreak value that can be set using ethtool's tunable but conceptually serves a different purpose. While tx-copybreak is used to reduce the overhead of DMA mapping and makes no sense to use if less than the whole segment gets copied, tx-push-buf-len allows to improve performance by analyzing the packet's data (usually headers) before performing the DMA operation. The configuration can be queried and set using the commands: $ ethtool -g [interface] # ethtool -G [interface] tx-push-buf-len [number of bytes] Shay Agroskin (2): update UAPI header copies ethtool: Add support for configuring tx-push-buf-len ethtool.8.in | 5 +++++ ethtool.c | 1 + netlink/desc-ethtool.c | 2 ++ netlink/rings.c | 38 +++++++++++++++++++++++------------- uapi/linux/ethtool_netlink.h | 2 ++ uapi/linux/rtnetlink.h | 1 + 6 files changed, 35 insertions(+), 14 deletions(-)