From mboxrd@z Thu Jan 1 00:00:00 1970 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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 6F6FAC169C4 for ; Thu, 31 Jan 2019 20:19:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3831620B1F for ; Thu, 31 Jan 2019 20:19:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727290AbfAaUTv (ORCPT ); Thu, 31 Jan 2019 15:19:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbfAaUTv (ORCPT ); Thu, 31 Jan 2019 15:19:51 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67EA589AD1; Thu, 31 Jan 2019 20:19:50 +0000 (UTC) Received: from carbon (ovpn-200-24.brq.redhat.com [10.40.200.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5C0160BF7; Thu, 31 Jan 2019 20:19:43 +0000 (UTC) Date: Thu, 31 Jan 2019 21:19:41 +0100 From: Jesper Dangaard Brouer To: Jakub Kicinski Cc: Maciej Fijalkowski , daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org, brouer@redhat.com Subject: Re: [PATCH bpf-next v4 5/7] samples/bpf: Add a "force" flag to XDP samples Message-ID: <20190131211941.2bfba5f2@carbon> In-Reply-To: <20190130182653.0f3bb01e@cakuba.hsd1.ca.comcast.net> References: <20190128191613.11705-1-maciejromanfijalkowski@gmail.com> <20190128191613.11705-6-maciejromanfijalkowski@gmail.com> <20190129090000.3c34b873@redhat.com> <20190129123405.787746f7@redhat.com> <20190130191248.00000167@gmail.com> <20190130200859.16237d3f@redhat.com> <20190130182653.0f3bb01e@cakuba.hsd1.ca.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 31 Jan 2019 20:19:50 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 30 Jan 2019 18:26:53 -0800 Jakub Kicinski wrote: > On Wed, 30 Jan 2019 20:08:59 +0100, Jesper Dangaard Brouer wrote: > > > I'll post a v5 with libbpf_strerror() usage when bpf_set_link_xdp_fd failed in > > > samples but at this point it will only give us a standard "device or resource > > > busy" error > > > > That is a good first iteration improvement. And if QA complains, I can > > quickly diagnose and explain the issue, based on this generic message, > > without digging further and wasting more time. > > > > > , so if we need some more meaningful message that libbpf will give > > > us then I guess we need to define a new libbpf_errno entry (as well as entry in > > > libbpf_strerror_table for this new errno value) and set the errno in > > > bpf_set_link_xdp_fd in case of a failure? > > > > It likely require more work do provide more meaningful messages, and I > > guess it is out-of-scope for your patchset. > > Perhaps we could put the error message in extack instead? That is actually a good idea, for providing these more meaningful messages. --Jesper