From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF31AA034F for ; Wed, 22 Dec 2021 22:44:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FEFD41101; Wed, 22 Dec 2021 22:44:17 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130091.outbound.protection.outlook.com [40.107.13.91]) by mails.dpdk.org (Postfix) with ESMTP id 7B2284003C; Wed, 22 Dec 2021 22:44:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QuNR0UYZbEwLyc2f48GGd6od8Ur+VaE4fincdpRCDoUGX7gh/YUa6TqobgP+VimBnnR0Eg/i4HuWVc+NJFHR36r9tGAYkY05gQyGTHJPp99ejphgRhfyg9UbcujupYd6Pja9QHxl+JBgUIvsnFPQcHO2GgvdMwVRqE0+yu7ts91WlJ7PwUGh0UptC/KXJOcm7ZF8CXlkA9w9iUJfi/P+r6jkxA4ATpisYyX3bUNgfe2wIt92dV8zLeYYul38yQwuMadkUQ+cmHhUOLnY1dGDwSjfJ5aWqL+U9LFZSw/x8GMWdyIlcAx/eoA5H8xkoeLV/uFA4fLyI9xCxZkI++3dgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EIoyK1FhfeyVpRDcgFJPPy7ajDvcAbnYefPtalU2Rtw=; b=PoqiJK4N2eiNQP19Vd6zJK8M8whvERepRKKTU5Q2kdGcYH9kLgIvrvGovw/qT2aK8sao9qNrIa59Q6250Z1T43+Vp0KwXzDpFNW++mygwXhpCijcgJCrSzN7jbmaFXBrJbctpY/blny5qrszFgLrHN7nW1glChtYjEk8uPzshlG2KNYs4p5z6+LW6mB97QBbq6YWPEEQ2LrxXi/a8d7cV20KXRhXJrUJJPCb6c7AgviDF3Q/juOvTZN4GCKvj3RHyZYO4Z/DFVD5ftzwJ/PfcZfPs9YdNqRa/Sn2xinR6QKHkSTvZBdYganqnk5X/Z730mUbyXKwVtLmYqrW+4X20Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silicom-usa.com; dmarc=pass action=none header.from=silicom-usa.com; dkim=pass header.d=silicom-usa.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SILICOMLTD.onmicrosoft.com; s=selector2-SILICOMLTD-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EIoyK1FhfeyVpRDcgFJPPy7ajDvcAbnYefPtalU2Rtw=; b=dqq/YkZQZJpr2lvs4pHQvPhaxG3e3iixGvWD+3KXR5h0+o6LyzxOcOeU1VLAEykqy97FrfMa5AWwNYFuWCMdjd9wWYEjwt67Ut67sI2xl8KZ60oPsla0210qpVQUMOsBmUDkoIhDjRht5TSRyBHRuPtcNLdrXZ7PM+u5MzZFiX4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; Received: from AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) by AM8PR04MB7331.eurprd04.prod.outlook.com (2603:10a6:20b:1c7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 22 Dec 2021 21:44:13 +0000 Received: from AM0PR04MB4083.eurprd04.prod.outlook.com ([fe80::f4db:d40d:a746:7bfc]) by AM0PR04MB4083.eurprd04.prod.outlook.com ([fe80::f4db:d40d:a746:7bfc%7]) with mapi id 15.20.4823.019; Wed, 22 Dec 2021 21:44:13 +0000 Message-ID: Date: Wed, 22 Dec 2021 16:44:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v2 3/7] net/ixgbe: Check that SFF-8472 soft rate select is supported before write Content-Language: en-US To: "Wang, Haiyue" , =?UTF-8?Q?Morten_Br=c3=b8rup?= , "Lu, Wenzhuo" , "Zhang, Helin" , "Zhang, Qi Z" Cc: "dev@dpdk.org" , "Wang, Wen" , "stable@dpdk.org" References: <20211206221922.644187-1-stephend@silicom-usa.com> <20211206221922.644187-4-stephend@silicom-usa.com> <98CBD80474FA8B44BF855DF32C47DC35D86D8B@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35D86D9B@smartserver.smartshare.dk> From: Stephen Douthit Organization: Silicom, Ltd. In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1PR13CA0076.namprd13.prod.outlook.com (2603:10b6:208:2b8::21) To AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83ca3311-e6d9-40b6-d8c2-08d9c59431af X-MS-TrafficTypeDiagnostic: AM8PR04MB7331:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z/jcNe3XQyrBBu+DNzPnQe9eUHBsL5xmV7BAauSyffv1JZp7cLyy6HS9oOZWn3M7awBiluL+HjizdpNKC9414SB1Pu039VQ6VDUy/avv2RCAasKHVx8cwA4l/j+ZgiHTDpi4H+luBPXx/RiG7cqYZevLn8NyrGjnfcc/EG3BHAkv1y5gBHlYwm/VZaLmQZsAPcyIE9PpOktaAnx38utwgUnWmF42R0pQcs59rY4VrIj0tjdeXF88g+bXpt5QsldcFW/z087DermVNfaRgILzXhBXRsmLL0N/j/KJF+a3GPRhnQZVgS1wUy4l/QioyLT1+koO2qvh0iP9yE4TAzHouez1ZxiyQY/qaz+CJQv8ZI4QrrYS1acdJxK/qFeMtwmd3RX8GjfVNJPFuVAoc92CuAV1IU0dHSqFjTdg9CP8BpTe0KZI0UJoCE8o1+tWLUFYwwWjuANOLX4GZyH3SeB0eHNtE+QxujiGGnE0pmSnmgjB/DjfWP3zhZ/UNky5NgZhCMka43mIajHHSe28C5NofGYq56z0/UUzAZdiXVPMxWGuoq+liHxVFarglCv0OJ4K8eUohNB6WQ1MJ2+OBNWiRCcUwClHi9a9MivbneJKmOoxiZEr83zEIx9AE7+FrFaulJ/P2oXWGtFVNvGbnIsSnAYbxuZXM0f+V5lCnSb350ByuZW6TONcwh0s5AkE7v4n26rgqnuLYedYbLwjOd+ioVfc6+1ERPvhlamj4Nosr5/b3jD0T4O84D18CM2zkGb6mNPrHR62HdXWDNoDHEHjhIv/tbMO9WgODl7ZY0LVjM5FqpAPtTeCBqzyoLl0r1XeK5r5NfdSSAnDC/B8Hm9had07EQzIXXX3tdjOznhdR78= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4083.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66556008)(66476007)(26005)(5660300002)(86362001)(6512007)(66946007)(38350700002)(38100700002)(186003)(4326008)(36756003)(31686004)(6666004)(3450700001)(4001150100001)(52116002)(966005)(2906002)(31696002)(110136005)(508600001)(316002)(30864003)(54906003)(6486002)(8676002)(36916002)(83380400001)(6506007)(2616005)(8936002)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eklTRElFWGdIb0h0a3N3WTZPL2RESGVBMThML25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?aEJuQUh6VFRMUFNsdWZ4azVyK3VRUU5zZHhCdWJheHIxU3d5cjFTcE03UkdT?= =?utf-8?B?Nk9WSnEvTHNDTTZ2RmlRRFArRWFrNE9pZHhsMzZVdTVZVnRRWjF0NEtLZnhw?= =?utf-8?B?a3lkMmJVVXFEM1hIcTJCQmZBOVJMWVgxUzgrSUwzRWw1aTRISlV4OFYrVXRp?= =?utf-8?B?Z2tZVUFLbGtCaWZQbld1TERqZWxlTWs2Q1JFVlZ6VExXZHU4Y2xyNmZYYUpE?= =?utf-8?B?QnV4RWZFRUxndWVuWTVqMHJKODBmbjE5aVQvU1JsVmJ2OWRRbWQ0WVhiYmpI?= =?utf-8?B?ZDZDcGp4TEcwdDczdHNyVnA2d3JEWnhmNFNCa2p6QmRjbzE2clNsS0MvU3Iw?= =?utf-8?B?K2kxVjhXNVJwcGpaWXAwNStQYXR1bGpwLzl4WUxxdlEvbjV1MFlTY2dwRkR2?= =?utf-8?B?RWcyeTFjUjZicG5QNXlxcmVYQ3R3PT0=?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83ca3311-e6d9-40b6-d8c2-08d9c59431af X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4083.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2021 21:44:13.1214 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c9e326d8-ce47-4930-8612-cc99d3c87ad1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: khsjDeMXBkDXSkuvebpsgIgRIPi89F6Ix+XMRru9PPFOQvP+epNg87fNr7ja0h7Wgf1JzyJVXhCewOUqsbIteC2b+Di7rt6jQgBJf6iVDrk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7331 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: stephend@silicom-usa.com Errors-To: stable-bounces@dpdk.org >>> >>> From Steve's response: >>> ME: "I guess this is just in C3000 reference board SDK ?" >>> Steve: "It's the board covered by Intel Doc # 574437." >>> >>> I check the doc "Last Updated: 11/07/2018".... It should be some kind >>> of customer release, that's why >>> they are not in the official *open source* Linux driver, so keep your >>> patch set as private. >> >> I didn't mention it explicitly, but I'm not involved with Silicom, and was not referring to their >> hardware. The hardware board we had problems with is currently in volume production at a major ODM. >> But I guess that it is usually being deployed with a 64 bit kernel, as opposed to the 32 bit kernel we >> were using. > > I understood, but we need to follow the open source vs customer release policy, > so not everything is upstream. I'm afraid we're still talking past each other here. I'm using the CRB as a "known good" platform to confirm that the hotplug issue is _not_ some OEM specific platform quirk. The CRB is not the target of the patch set, it's a way for me to make sure I'm not chasing a bug in our hardware. If our hardware was the only place the bug was present I would agree that maintaining this fix outside of mainline would make sense, but testing on the CRB proves that's not the case. Implying that testing patches on a CRB somehow makes them ineligible to be open sourced/upstreamed doesn't really make sense to me. > The ixgbe (especially in base directory) code is so stable, so in other words, > this patch set can be rebased easily. ;-) I found an 82599ES (device ID 0x10fb) this afternoon, and the dpdk ixgbe driver is "so stable" (I know you meant from a standpoint of few commits, but couldn't resist) that it has the exact same problem I was debugging on the C3000 devices. :) Big log at the end of the email.[4] Unfortunately my patch series does not fix the issue on the 82599 like it did for the C3000, so I'll need to look into that now that I have a card to test on. :( > If the patch is about ixgbe ethdev part (vs kernel netdev), it will be welcomed, > since our team mainly work on this (And the base code is mainly developed by the > kernel team, that's why I recommend to send it to > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan). What I believe you're saying is that you want any edits to base/* to come from the mainline Linux driver, and only fixes to ixgbe_ethdev.c from this mailing list. Here's how the hotplug patches -- 1, 2, 4, 5 -- (ignoring 3, 6, & 7 for now), break down into those two categories: Patch 1: All edits are to ixgbe_ethdev.c, and the same code is already in the mainline.[1] Seems good to submit here. Patch 2: Located in base/, but exports functionality that makes Patch 5 simpler. I could probably drop this patch and rework Patch 5 to just attempt an I2C read and see if it's ACKed/NAKed, but I believe that this is cleaner. Since the driver bitbangs the I2C bus, I'd prefer to avoid the overhead and check the SFP present signal via the associated SDP input and skip the I2C traffic if I know the cage is empty. This patch seems like it could go either way, add present check to Linux and backport, or just move the code into ixgbe_ethdev.c since it's not fixing anything in Linux. Patch 4: Located in base/, but addresses a workaround found _only in dpdk_ that checks the TX laser enable bit (SDP3 on 82599) to qualify the link status reported by ixgbe_check_mac_link_generic(). The original code smells off to me for a number of reasons. 1) There's nothing like that in mainline. The only code touching SDP3 there is just controlling the TX laser[2], SDP3's status is never read. 2) The workaround runs on all fiber platforms, even though the commit message said it was for the 82599eb. The C3000 doesn't use SDP3 for TX_DISABLE so poking it on that platform is definitely incorrect, and may be wrong for others. 3) Open coding this in a single location instead of putting it in a platform specific mac->ops.check_link() callback implies that the link status returned at every other check_link() callsite may be bogus if the workaround is really needed. I could leave the workaround where it started off in ixgbe_ethdev and just add a mac type qualifier. With that edit it seems good to submit here. Patch 5: All edits are to ixgbe_ethdev.c, and addresses an issue not found in the Linux driver. The Linux driver uses ixgbe_service_task()[3] to handle SFP detection and setup, and handles hotplug just fine. This patch moves the dpdk driver closer to that working scheme. Seems good to submit here. In summary: 1 & 5 seem like clear candidates to upstream directly via dpdk, 2 could be reworked to avoid touching base/ or dropped and 5 refactored, and 4 can be easily refactored to avoid touching base/. However my gut says something's off and commits 1ca05831b9b & ff8162cb957 that made patch 4 necessary in the first place weren't really getting to root cause since the Linux driver functions without this workaround. > Hope this will make things clear. ;-) Same. :) Either way I'm hoping to be out for the rest of the year, so I'll revisit this January 3rd. Happy holidays! Thanks, Steve [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c?h=v5.16-rc6#n2887 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c?h=v5.16-rc6#n572 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c?h=v5.16-rc6#n592 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c?h=v5.16-rc6#n7911 [4] Wall of text: Script started on 2021-12-22 11:19:00-05:00 [TERM="screen.xterm-256color" TTY="/dev/pts/2" COLUMNS="136" LINES="72"] [root@madrid dpdk]# ./build/app/dpdk-testpmd --log-level *:info -c7 --vdev=0000:20:00.0 --vdev=0000:20:00.1 -- -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048 EAL: Detected CPU lcores: 8 EAL: Detected NUMA nodes: 1 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Ignore mapping IO port bar(2) EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:20:00.0 (socket 0) EAL: Ignore mapping IO port bar(2) EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:20:00.1 (socket 0) Interactive-mode selected testpmd: create a new mbuf pool : n=2048, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) ixgbe_dev_link_status_print(): Port 0: Link Down Port 0: 00:E0:ED:97:62:4D Configuring Port 1 (socket 0) ixgbe_dev_link_status_print(): Port 1: Link Down Port 1: 00:E0:ED:97:62:4E Checking link statuses... Done testpmd> # started with empty SFP cages testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: 00:E0:ED:97:62:4D Device name: 0000:20:00.0 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: down Link speed: None Link duplex: half-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) ********************* Infos for port 1 ********************* MAC address: 00:E0:ED:97:62:4E Device name: 0000:20:00.1 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: down Link speed: None Link duplex: half-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) testpmd> # Cages now filled with 1G SFPs testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: 00:E0:ED:97:62:4D Device name: 0000:20:00.0 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: down Link speed: None Link duplex: half-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) ********************* Infos for port 1 ********************* MAC address: 00:E0:ED:97:62:4E Device name: 0000:20:00.1 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: down Link speed: None Link duplex: half-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) testpmd> # No link detected if SFPs not present when testpmd launched, bug testpmd> quit Stopping port 0... Stopping ports... Done Stopping port 1... Stopping ports... Done Shutting down port 0... Closing ports... Port 0 is closed Done Shutting down port 1... Closing ports... Port 1 is closed Done Bye... [root@madrid dpdk]# # Starting testpmd again with 1G SFPs already in cages [root@madrid dpdk]# ./build/app/dpdk-testpmd --log-level *:info -c7 --vdev=0000:20:00.0 --vdev=0000:20:00.1 -- -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048 EAL: Detected CPU lcores: 8 EAL: Detected NUMA nodes: 1 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Ignore mapping IO port bar(2) EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:20:00.0 (socket 0) EAL: Ignore mapping IO port bar(2) EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:20:00.1 (socket 0) Interactive-mode selected testpmd: create a new mbuf pool : n=2048, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) ixgbe_dev_link_status_print(): Port 0: Link Down Port 0: 00:E0:ED:97:62:4D Configuring Port 1 (socket 0) ixgbe_dev_link_status_print(): Port 1: Link Down Port 1: 00:E0:ED:97:62:4E Checking link statuses... ixgbe_dev_link_status_print(): Port 1: Link Up - speed 1000 Mbps - full-duplex ixgbe_dev_link_status_print(): Port 0: Link Up - speed 1000 Mbps - full-duplex Done testpmd> ixgbe_dev_link_status_print(): Port 1: Link Up - speed 1000 Mbps - full-duplex Port 1: link state change event ixgbe_dev_link_status_print(): Port 0: Link Up - speed 1000 Mbps - full-duplex Port 0: link state change event testpmd> # Link detected correctly for SFPs present on testpmd start testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: 00:E0:ED:97:62:4D Device name: 0000:20:00.0 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: up Link speed: 1 Gbps Link duplex: full-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) ********************* Infos for port 1 ********************* MAC address: 00:E0:ED:97:62:4E Device name: 0000:20:00.1 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: up Link speed: 1 Gbps Link duplex: full-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) testpmd> # unplug/replug 1G SFPs testpmd> ixgbe_dev_link_status_print(): Port 0: Link Down ixgbe_dev_link_status_print(): Port 1: Link Down ixgbe_dev_link_status_print(): Port 0: Link Down Port 0: link state change event ixgbe_dev_link_status_print(): Port 1: Link Down Port 1: link state change event ixgbe_dev_link_status_print(): Port 1: Link Up - speed 1000 Mbps - full-duplex ixgbe_dev_link_status_print(): Port 0: Link Up - speed 1000 Mbps - full-duplex ixgbe_dev_link_status_print(): Port 1: Link Up - speed 1000 Mbps - full-duplex Port 1: link state change event ixgbe_dev_link_status_print(): Port 0: Link Up - speed 1000 Mbps - full-duplex Port 0: link state change event testpmd> # Link back up at 1G after unplug/replug testpmd> # Now swapping 1G SFPs for 10G SFPs testpmd> ixgbe_dev_link_status_print(): Port 0: Link Down ixgbe_dev_link_status_print(): Port 1: Link Down ixgbe_dev_link_status_print(): Port 0: Link Down Port 0: link state change event ixgbe_dev_link_status_print(): Port 1: Link Down Port 1: link state change event ixgbe_dev_link_status_print(): Port 1: Link Up - speed 1000 Mbps - full-duplex ixgbe_dev_link_status_print(): Port 0: Link Up - speed 1000 Mbps - full-duplex ixgbe_dev_link_status_print(): Port 1: Link Up - speed 1000 Mbps - full-duplex Port 1: link state change event ixgbe_dev_link_status_print(): Port 0: Link Up - speed 1000 Mbps - full-duplex Port 0: link state change event testpmd> # Same bug, testpmd did not correctly ID and link at 10G, still at 1G testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: 00:E0:ED:97:62:4D Device name: 0000:20:00.0 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: up Link speed: 1 Gbps Link duplex: full-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) ********************* Infos for port 1 ********************* MAC address: 00:E0:ED:97:62:4E Device name: 0000:20:00.1 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: up Link speed: 1 Gbps Link duplex: full-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) testpmd> # quit and restart testpmd with 10G SFPs already installed testpmd> quit Stopping port 0... Stopping ports... ixgbe_dev_link_status_print(): Port 1: Link Down Done Stopping port 1... Stopping ports... Done Shutting down port 0... Closing ports... Port 0 is closed Done Shutting down port 1... Closing ports... Port 1 is closed Done Bye... [root@madrid dpdk]# ./build/app/dpdk-testpmd --log-level *:info -c7 --vdev=0000:20:00.0 --vdev=0000:20:00.1 -- -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048 EAL: Detected CPU lcores: 8 EAL: Detected NUMA nodes: 1 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Ignore mapping IO port bar(2) EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:20:00.0 (socket 0) EAL: Ignore mapping IO port bar(2) EAL: Probe PCI driver: net_ixgbe (8086:10fb) device: 0000:20:00.1 (socket 0) Interactive-mode selected testpmd: create a new mbuf pool : n=2048, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) ixgbe_dev_link_status_print(): Port 0: Link Down Port 0: 00:E0:ED:97:62:4D Configuring Port 1 (socket 0) ixgbe_dev_link_status_print(): Port 1: Link Down Port 1: 00:E0:ED:97:62:4E Checking link statuses... ixgbe_dev_link_status_print(): Port 1: Link Up - speed 10000 Mbps - full-duplex ixgbe_dev_link_status_print(): Port 0: Link Up - speed 10000 Mbps - full-duplex Done testpmd> ixgbe_dev_link_status_print(): Port 1: Link Up - speed 10000 Mbps - full-duplex Port 1: link state change event ixgbe_dev_link_status_print(): Port 0: Link Up - speed 10000 Mbps - full-duplex Port 0: link state change event testpmd> # now linked correctly @ 10G testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: 00:E0:ED:97:62:4D Device name: 0000:20:00.0 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: up Link speed: 10 Gbps Link duplex: full-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) ********************* Infos for port 1 ********************* MAC address: 00:E0:ED:97:62:4E Device name: 0000:20:00.1 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: up Link speed: 10 Gbps Link duplex: full-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) testpmd> # swap 10G SFPs for 1G, expect no link since they wont be IDed and setup for 1G, and cant handle 10G testpmd> ixgbe_dev_link_status_print(): Port 0: Link Down ixgbe_dev_link_status_print(): Port 1: Link Down ixgbe_dev_link_status_print(): Port 0: Link Down Port 0: link state change event ixgbe_dev_link_status_print(): Port 1: Link Down Port 1: link state change event testpmd> # 1G SFPs now installed, and as expected, no link :( testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: 00:E0:ED:97:62:4D Device name: 0000:20:00.0 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: down Link speed: None Link duplex: half-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) ********************* Infos for port 1 ********************* MAC address: 00:E0:ED:97:62:4E Device name: 0000:20:00.1 Driver name: net_ixgbe Firmware-version: 0x800000cb Devargs: Connect to socket: 0 memory allocation on the socket: 0 Link status: down Link speed: None Link duplex: half-duplex Autoneg status: On MTU: 1500 Promiscuous mode: enabled Allmulticast mode: disabled Maximum number of MAC addresses: 128 Maximum number of MAC addresses of hash filtering: 4096 VLAN offload: strip off, filter off, extend off, qinq strip off Hash key size in bytes: 40 Redirection table size: 128 Supported RSS offload flow types: ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex ipv6-tcp-ex ipv6-udp-ex Minimum size of RX buffer: 1024 Maximum configurable length of RX packet: 15872 Maximum configurable size of LRO aggregated packet: 0 Maximum number of VMDq pools: 64 Current number of RX queues: 1 Max possible RX queues: 128 Max possible number of RXDs per queue: 4096 Min possible number of RXDs per queue: 32 RXDs number alignment: 8 Current number of TX queues: 1 Max possible TX queues: 64 Max possible number of TXDs per queue: 4096 Min possible number of TXDs per queue: 32 TXDs number alignment: 8 Max segment number per packet: 40 Max segment number per MTU/TSO: 40 Device capabilities: 0x0( ) testpmd> quit Stopping port 0... Stopping ports... Done Stopping port 1... Stopping ports... Done Shutting down port 0... Closing ports... Port 0 is closed Done Shutting down port 1... Closing ports... Port 1 is closed Done Bye... [root@madrid dpdk]# exit Script done on 2021-12-22 11:32:00-05:00 [COMMAND_EXIT_CODE="0"]