Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1017871pxv; Thu, 15 Jul 2021 23:01:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhCwfb1aRtuh64uRpVDwde/dCrZWlHKH98PBnf7K2XsEqyN6fkgNar0lyK9A1eFl4wIGG+ X-Received: by 2002:a17:906:f84a:: with SMTP id ks10mr9775064ejb.537.1626415304471; Thu, 15 Jul 2021 23:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626415304; cv=none; d=google.com; s=arc-20160816; b=HIDT6fQiWerpe/gZ2oLkVZs3iBPLIJHFUHlkjOMGr3Xnunq0l7Mt6rHUcI0+hEKdFy Hz2bfdidhde4SYURMKyjG8yN6zud5j6oh21an3+fxW6HJ/6RvwDUEyodjZ2e0lRrhvSv dvf6s2Iyssne90r7Jne8R3JxSzgKjUlXALy0QpKnRs0DUyMjTLhK/KFVQsKdcGWeMhiP mvRl6FMkyajXDNkFWRORB0q7kGBuMc/x4gMiWPa8i2H4XmxdYFab7CqD7yMnJzFkTjeI 6+KBZvT8zU12XSpxOsozqmnTDuEbmQWGKlOmVgEWty+3NLAYUIzKq9tZ9Z/0k7Xt5aV1 DclQ== 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:subject:cc:to:from:date :dkim-signature; bh=f+YuqkVLOMj7ya8x+U5tjGSAlnigw2gPbPLUlhQh4bI=; b=oosrFD/AdaQK/IDpWRSrEnwN7uXKoSm8zb6X65ipYVNBUIegunDSEcAz1OII0n0UBm noF57ZYXmDmeFgnPZYKW2SwVXORaSEj5MumbJKm7r0AsnTo0pHCnRqVJgSZUVKtTc7I2 mfurOD81aEIjK5C3/0UZGNfwK10X3CdxLwFSPOxf86fNCZoEZHbQrhXekjEn3ejQTkfM F5FiOkrX+VyvOdqxmIQezOp3U0fCjhEzFurwxdJNZFw5N4vi0LuTSqZS+HiO9z4+gu2G 2hp1J8+yps36+5bpF2okfI6kuaqKvGsZCG6hPNBWlobnKa8180n6UVEaKglKHFqYxe9P 9dzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P+xwNDIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qb27si9721850ejc.33.2021.07.15.23.01.20; Thu, 15 Jul 2021 23:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P+xwNDIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234468AbhGPGDO (ORCPT + 99 others); Fri, 16 Jul 2021 02:03:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:38124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbhGPGDN (ORCPT ); Fri, 16 Jul 2021 02:03:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 52075613AF; Fri, 16 Jul 2021 06:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626415219; bh=PgrHgohX9pk702vBlT0LnHfqXt4bH8D+RAr5u/CmCj4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P+xwNDIGrOD3LiCrL/Atlu1LlIbv2ejinjYLsfztWgNkkTthUKNCUJv9JhnL05NKZ ufXd+al7GS2FSocUAToR9hNCRxzMNlX40R6jULlqUC+gnovyvpnVa4jKRShF2MKkIw 8mxbpXQue3RUntG+lPt7URlOBh0msU119hAA/8eMbVrl32dmIcEx+e5AG0vC2qWBpu YX9cN2i4j2SlZr8rdW9y1nFlpDJtO1aC/4Gy2KZIB8NgDKrEE0HKePCEfJnhsq1giG udN//yAI/kJACyK5GCtN/Rlqcwho8z1/9IDZUKBTzoDQTeKjNP8AGdwUMklFELEGVF RNF7IsZxQhw/g== Date: Fri, 16 Jul 2021 08:00:13 +0200 From: Jakub Kicinski To: Guangbin Huang Cc: , , , , , Subject: Re: [PATCH V2 net-next 1/9] devlink: add documentation for hns3 driver Message-ID: <20210716080013.652969bf@cakuba> In-Reply-To: <1626335110-50769-2-git-send-email-huangguangbin2@huawei.com> References: <1626335110-50769-1-git-send-email-huangguangbin2@huawei.com> <1626335110-50769-2-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Jul 2021 15:45:02 +0800, Guangbin Huang wrote: > From: Hao Chen > > Add a file to document devlink support for hns3 driver. > > Now support devlink param and devlink info. > > Signed-off-by: Hao Chen > Signed-off-by: Guangbin Huang > +This document describes the devlink features implemented by the ``hns3`` > +device driver. > + > +Parameters > +========== > + > +The ``hns3`` driver implements the following driver-specific > +parameters. > + > +.. list-table:: Driver-specific parameters implemented > + :widths: 10 10 10 70 > + > + * - Name > + - Type > + - Mode > + - Description > + * - ``rx_buf_len`` > + - U32 > + - driverinit > + - Set rx BD buffer size, now only support setting 2048 and 4096. > + > + * The feature is used to change the buffer size of each BD of Rx ring > + between 2KB and 4KB, then do devlink reload operation to take effect. Does the reload required here differ from the reload performed when the ring size is changed? You can extend the ethtool API, devlink params should be used for very vendor specific configuration. Which page fragment size very much is not. > + * - ``tx_buf_size`` > + - U32 > + - driverinit > + - Set tx bounce buf size. > + > + * The size is setted for tx bounce feature. Tx bounce buffer feature is > + used for small size packet or frag. It adds a queue based tx shared > + bounce buffer to memcpy the small packet when the len of xmitted skb is > + below tx_copybreak(value to distinguish small size and normal size), > + and reduce the overhead of dma map and unmap when IOMMU is on. IMHO setting the tx_copybreak should be configured thru the same API as the size of the buffer it uses. Hence, again, ethtool.