From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47A65C4320E for ; Wed, 4 Aug 2021 15:51:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2AE4361073 for ; Wed, 4 Aug 2021 15:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239424AbhHDPv4 (ORCPT ); Wed, 4 Aug 2021 11:51:56 -0400 Received: from ale.deltatee.com ([204.191.154.188]:54802 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239214AbhHDPvy (ORCPT ); Wed, 4 Aug 2021 11:51:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=VAs5UjRtgSdqMEi8N1UFafwkPftDPX3haJmemJpQxKo=; b=qzwKi3ShxTPZRbFP0IKYI2MLLq 4grholbmN7sed3zBtdSyb6zZt4gc7djXMu/fvYd5s/fV3FYvpCRZwCGt9nQihB6lQ5+QGlBuEa4lN NCxkXiKrdmAstr7R8LwgXK/hWyU89OUdAt72RtgSzXLNXlnngadle8SNbXpD8ENBC5fOcbcdHogEp eoavcbFlsIc35KIFQqVKBENHEpJSRU9yUHJwE1f9+zl5JkpAMFTYM/Zk3wSR92rbZrTX8zIhtLunJ vJvuqznBqGc3ZLorPoNbcOxgJOkh7hvZrvf9AmmCRumNyXyMklmdCdZQ7YgQ2gK0rYUaBF34BVjyK A5w5eWTA==; Received: from s0106a84e3fe8c3f3.cg.shawcable.net ([24.64.144.200] helo=[192.168.0.10]) by ale.deltatee.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mBJB8-0003B9-M2; Wed, 04 Aug 2021 09:51:35 -0600 To: Dongdong Liu , helgaas@kernel.org, hch@infradead.org, kw@linux.com, leon@kernel.org, linux-pci@vger.kernel.org, rajur@chelsio.com, hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, netdev@vger.kernel.org References: <1628084828-119542-1-git-send-email-liudongdong3@huawei.com> <1628084828-119542-8-git-send-email-liudongdong3@huawei.com> From: Logan Gunthorpe Message-ID: <75243571-3213-6ae2-040f-ae1b1f799e42@deltatee.com> Date: Wed, 4 Aug 2021 09:51:29 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <1628084828-119542-8-git-send-email-liudongdong3@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.64.144.200 X-SA-Exim-Rcpt-To: netdev@vger.kernel.org, linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl, rajur@chelsio.com, linux-pci@vger.kernel.org, leon@kernel.org, kw@linux.com, hch@infradead.org, helgaas@kernel.org, liudongdong3@huawei.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH V7 7/9] PCI/sysfs: Add a 10-Bit Tag sysfs file X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2021-08-04 7:47 a.m., Dongdong Liu wrote: > PCIe spec 5.0 r1.0 section 2.2.6.2 says that if an Endpoint supports > sending Requests to other Endpoints (as opposed to host memory), the > Endpoint must not send 10-Bit Tag Requests to another given Endpoint > unless an implementation-specific mechanism determines that the Endpoint > supports 10-Bit Tag Completer capability. Add a 10bit_tag sysfs file, > write 0 to disable 10-Bit Tag Requester when the driver does not bind > the device if the peer device does not support the 10-Bit Tag Completer. > This will make P2P traffic safe. the 10bit_tag file content indicate > current 10-Bit Tag Requester Enable status. Can we not have both the sysfs file and the command line parameter? If the user wants to disable it always for a specific device this sysfs parameter is fairly awkward. A script at boot to unbind the driver, set the sysfs file and rebind the driver is not trivial and the command line parameter offers additional options for users. Logan