From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:37153 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbeCPT2D (ORCPT ); Fri, 16 Mar 2018 15:28:03 -0400 Received: by mail-qt0-f195.google.com with SMTP id a23so12051962qtm.4 for ; Fri, 16 Mar 2018 12:28:03 -0700 (PDT) Date: Fri, 16 Mar 2018 16:27:59 -0300 From: Marcelo Ricardo Leitner To: netdev@vger.kernel.org Cc: Alexander Aring , Jiri Pirko , Jakub Kicinski Subject: Re: [PATCH RFC 0/2] Add support for warnings to extack Message-ID: <20180316192759.GA4831@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Mar 16, 2018 at 04:23:08PM -0300, Marcelo Ricardo Leitner wrote: > Currently we have the limitation that warnings cannot be reported though > extack. For example, when tc flower failed to get offloaded but got > installed on software datapath. The hardware failure is not fatal and > thus extack is not even shared with the driver, so the error is simply > omitted from any logging. > > The idea here is to allow such kind of warnings to get through and be > available for the sysadmin or the tool managing such commands (like Open > vSwitch), so that if this happens, we will have such log message in a > file later. > > The first patch extends extack to support more than one message and with > different log level (currently only error and warning). The second > shares extack with the drivers regardless of skip_sw. > > The iproute patch also follows. > > This kernel change is backward compatible with older iproute because > iproute will only process the last message, which should be the error > one in case of failure, or a warning if it suceeded. > > The iproute change is compatible with older kernels because it will find > only one message to be processed and will handle it properly. > > With this patches, this is now possible: > # tc qdisc add dev p7p1 ingress > # tc filter add dev p7p1 parent ffff: protocol ip prio 1 flower \ > src_mac ec:13:db:00:00:00 dst_mac ec:14:c2:00:00:00 \ > src_ip 56.0.0.0 dst_ip 55.0.0.0 action drop > Warning: TC offload is disabled on net device. > # echo $? > 0 Will have more and better examples once we actually have more than one message being added. > > Marcelo Ricardo Leitner (2): > netlink: extend extack so it can carry more than one message > sched: pass extack through even if skip_sw is not set > > include/linux/netlink.h | 50 +++++++++++++++++++++++++++++------------------- > include/net/pkt_cls.h | 3 +-- > net/netlink/af_netlink.c | 12 +++++++----- > 3 files changed, 38 insertions(+), 27 deletions(-) > > -- > 2.14.3 >