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: 11891525 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 41749C2D0A3 for ; Mon, 9 Nov 2020 13:29:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01DC82076E for ; Mon, 9 Nov 2020 13:29:58 +0000 (UTC) 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 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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(-)