From owner-freebsd-net@freebsd.org Tue Feb 11 18:08:29 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C6DB23DF97 for ; Tue, 11 Feb 2020 18:08:29 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48H9kN3xMNz4Q7W for ; Tue, 11 Feb 2020 18:08:28 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 01BI8E4d060966 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 11 Feb 2020 20:08:17 +0200 (EET) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01BI8E4d060966 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01BI8ELw060965; Tue, 11 Feb 2020 20:08:14 +0200 (EET) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Tue, 11 Feb 2020 20:08:14 +0200 From: Konstantin Belousov To: Adam Peace Cc: freebsd-net@freebsd.org, freebsd-drivers@mellanox.com Subject: Re: mlx5en - PTYS reg - eth_proto_oper bit 19 not defined Message-ID: <20200211180814.GC4808@kib.kiev.ua> References: <20200207214616.GT4808@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 48H9kN3xMNz4Q7W X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.79 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-0.80)[-0.804,0]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:08:29 -0000 On Mon, Feb 10, 2020 at 03:56:29PM -0500, Adam Peace wrote: > Thank you for the information. After searching, I found the 50GBase-KR4 > link mode is described in this patent: > https://patents.google.com/patent/US8891561. I have applied the below patch > to my local kernel and the driver appears to be loading and operating > properly (without much testing yet). Is there anything else required beyond > this? Should be not, at least for ethernet. > > I was unsure of the methodology for defining a value for a new media type. > Others seem to have been added sequentially and assigned the next available > integer. Is there another method for doing this that I overlooked? No, this looks fine, thank you. I committed the sys/net part of your patch as r357765. > > Also, how were you able to tell me that the PTYS register eth_proto_oper > value of 0x80000 corresponds to 50GBase-KR4? Is there a mapping of these > values maintained somewhere? I have some internal knowledge about Mellanox cards. The driver-specific bits will get an internal review and QA at Mellanox and then going to be committed to svn. Thank you.