Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751391AbdLIX5Z (ORCPT ); Sat, 9 Dec 2017 18:57:25 -0500 Received: from mx4.wp.pl ([212.77.101.11]:15087 "EHLO mx4.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281AbdLIX5X (ORCPT ); Sat, 9 Dec 2017 18:57:23 -0500 Date: Sat, 9 Dec 2017 15:57:15 -0800 From: Jakub Kicinski To: Eric Leblond Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net Subject: Re: [PATCH net-next] libbpf: add function to setup XDP Message-ID: <20171209155715.78ef02e1@cakuba.netronome.com> In-Reply-To: <20171209144315.25890-1-eric@regit.org> References: <20171209144315.25890-1-eric@regit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-WP-MailID: 89a7bc1cc6d3d308894f9cf240cf63c5 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000A [YUMU] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 29 On Sat, 9 Dec 2017 15:43:15 +0100, Eric Leblond wrote: > + for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); > + nh = NLMSG_NEXT(nh, len)) { > + if (nh->nlmsg_pid != getpid()) { > + ret = -LIBBPF_ERRNO__WRNGPID; > + goto cleanup; > + } > + if (nh->nlmsg_seq != seq) { > + ret = -LIBBPF_ERRNO__INVSEQ; > + goto cleanup; > + } > + switch (nh->nlmsg_type) { > + case NLMSG_ERROR: > + err = (struct nlmsgerr *)NLMSG_DATA(nh); > + if (!err->error) > + continue; > + ret = err->error; > + goto cleanup; > + case NLMSG_DONE: > + break; > + default: > + break; > + } Would it be possible to print out or preferably return to the caller the ext ack error message? A couple of drivers are using it for XDP mis-configuration reporting instead of printks. We should encourage other to do the same and support it in all user space since ext ack msgs lead to much better user experience.