From patchwork Mon Nov 9 13:29:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kubecek X-Patchwork-Id: 1396753 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CVBgW0sxRzB3wG for ; Tue, 10 Nov 2020 00:29:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733263AbgKIN36 (ORCPT ); Mon, 9 Nov 2020 08:29:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:38694 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732433AbgKIN3z (ORCPT ); Mon, 9 Nov 2020 08:29:55 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9FE26ABCC; Mon, 9 Nov 2020 13:29:53 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id 5E9B460344; Mon, 9 Nov 2020 14:29:53 +0100 (CET) Message-Id: From: Michal Kubecek Subject: [PATCH ethtool 0/2] netlink: improve compatibility with ioctl interface To: netdev@vger.kernel.org Cc: Ido Schimmel , Jakub Kicinski , Ivan Vecera Date: Mon, 9 Nov 2020 14:29:53 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Restore special behavior of "ethtool -s autoneg on" if no advertised modes, speed and duplex are requested: ioctl code enables all link modes supported by the device. This is most important for network devices which report no advertised modes when autonegotiation is disabled. First patch cleans up the parser interface; it allows nl_sset() to inspect the composed message and append an attribute to it if needed. Ido Schimmel (1): ethtool: Improve compatibility between netlink and ioctl interfaces Michal Kubecek (1): netlink: do not send messages and process replies in nl_parser() netlink/cable_test.c | 2 +- netlink/channels.c | 2 +- netlink/coalesce.c | 2 +- netlink/eee.c | 2 +- netlink/parser.c | 43 ++++++++++----- netlink/parser.h | 3 +- netlink/pause.c | 2 +- netlink/rings.c | 2 +- netlink/settings.c | 127 +++++++++++++++++++++++++++++++++++++++++-- 9 files changed, 158 insertions(+), 27 deletions(-)