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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE744C433F5 for ; Mon, 7 Mar 2022 17:59:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238659AbiCGSAo (ORCPT ); Mon, 7 Mar 2022 13:00:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236338AbiCGSAn (ORCPT ); Mon, 7 Mar 2022 13:00:43 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F246E5C343; Mon, 7 Mar 2022 09:59:48 -0800 (PST) Date: Mon, 7 Mar 2022 18:59:45 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646675986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QPqZCsSMUpT1klICkBMJK4cJGdzAgay2cyjOQSPKVqE=; b=k+wFjnO44RUwF9VUiX0v6wQyJEFLm0Yn9RN8rFsInRQ/Sj5+/8F9+I/IYAU9aFLY3Cng2i EfbVZCXwCOBQ5ap49Ym+f3rm6jVIuK3GLvehlso6JJvhflXjfi6PoqJ0+gyhqafwlyzxvY p+lRQHKkPWyEJ2EgTjqeofp0sWbgcq1dg36hjgtsjhxkfvfztHgASPvaU37vbF4vxDTLee GvvJW2D4xECNma4v3H05oRu5cmjogrssJMWBNOzSTPqQ4UAnn5EezLz9f8Lg87S6xnizle vdrhXsG/vyaj9/JM1fPzca7Nf3Mt+u23/6UoS6JQ6b9rMhGjmsChfFKjtEY+sg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646675986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QPqZCsSMUpT1klICkBMJK4cJGdzAgay2cyjOQSPKVqE=; b=f5ECwViYfCQYjtP37gcgMZpTeRhBAdRTkLmSl6tjntJWhcw37TZV4HDkte0xA3zp53HeSr Mze1eER0KxCXRjCw== From: Sebastian Andrzej Siewior To: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , "David S. Miller" , Ingo Molnar , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , KP Singh , Martin KaFai Lau , Song Liu , Steven Rostedt , Thomas Gleixner , Yonghong Song Subject: Re: [PATCH net] xdp: xdp_mem_allocator can be NULL in trace_mem_connect(). Message-ID: References: <875yovdtm4.fsf@toke.dk> <87y21l7lmr.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <87y21l7lmr.fsf@toke.dk> Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 2022-03-07 17:50:04 [+0100], Toke H=C3=B8iland-J=C3=B8rgensen wrote: >=20 > Right, looking at the code again, the id is only assigned in the path > that doesn't return NULL from __xdp_reg_mem_model(). >=20 > Given that the trace points were put in specifically to be able to pair > connect/disconnect using the IDs, I don't think there's any use to > creating the events if there's no ID, so I think we should fix it by > skipping the trace event entirely if xdp_alloc is NULL. This sounds like a reasonable explanation. If nobody disagrees then I post a new patch tomorrow and try to recycle some of what you wrote :) > -Toke Sebastian