Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5833665iob; Tue, 10 May 2022 04:57:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyftp8j378RyeU8R6nU8m7TWpxtskKU6wQsCNC+KzlESN5+m5WReofDYPq8XO75umbp5Baq X-Received: by 2002:a17:902:c409:b0:15e:bdd3:1fa3 with SMTP id k9-20020a170902c40900b0015ebdd31fa3mr20366449plk.67.1652183879671; Tue, 10 May 2022 04:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652183879; cv=none; d=google.com; s=arc-20160816; b=d9k1VAsnV4RIU2j/WbI5qWBDz0YgI0BXKlCwK/ygBJWbs4aDiMSGHvSqlcxeYugy65 8n32r+C8mPJ9Gxp4KzydwmQfYeVfhPf/DGslAz3bMCoovSTW3P1VFhqMEoDkj3OjBuZt CStWX2Xy8CE7UdhMdRhj6W11ST0iW2VR5FbaisKbf9TWojtgdoPbmohpJ/w6Tc5mRKq4 DEUxmDXvWiIxby19SnytURx3Vkaic4Lpic3gAqjKDy2d9rs7Zztsl55W+I2biYS3LSfk Pmnvl/4PAen1L9X5Or1cR17684NHkEk5TGUCELg0L2xL2r7CYTnD+sgiKwiMqrq93ErN cXSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fKdlxnTpRoy5VCfSO1T49XhByFiOtA3mKGGcTubQEzg=; b=QggkKsj81H3yua3JDsuKhYAxrlXWaguUhHeo3YU22LW+VgwurDyd3N7GbyRUmIueJA mTZSEmnOIKFFuCJztrCSCl6FwdmcoU0ajF0EWWn16heorKdYndvqLGsWYd2zks46tZm2 yMhUYNgXpjPqJeP/919dNqoo1RtG1wd3USIkQYXHJj01DqMwiM9T/UCJ2J4mRIuCtQBM /jHQuIqpIg7w6kVdEwgeFbgDyxUmoP2hyzxpvfpPqYaoDHEtGVGPI/g1TCnrZuedu0sl LsFF4Pk7fFI1Rl0cFPHJqs8jNBXS+G+WpHQ4JtATT3B0QiVr7WTmjt76v2+ynKvM/pfo Ahlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a170902e5c300b0015ce3e35354si3777044plf.90.2022.05.10.04.57.43; Tue, 10 May 2022 04:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235787AbiEJEi5 (ORCPT + 99 others); Tue, 10 May 2022 00:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232590AbiEJEiS (ORCPT ); Tue, 10 May 2022 00:38:18 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C08F2AF0 for ; Mon, 9 May 2022 21:34:23 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noHZY-0007q2-KZ; Tue, 10 May 2022 06:34:08 +0200 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1noHZW-0007VY-K5; Tue, 10 May 2022 06:34:06 +0200 Date: Tue, 10 May 2022 06:34:06 +0200 From: Oleksij Rempel To: Devid Antonio Filoni Cc: Robin van der Gracht , kernel@pengutronix.de, linux-can@vger.kernel.org, Oleksij Rempel , Oliver Hartkopp , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Maxime Jayat , kbuild test robot , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND 0/2] j1939: make sure that sent DAT/CTL frames are marked as TX Message-ID: <20220510043406.GB10669@pengutronix.de> References: <20220509170746.29893-1-devid.filoni@egluetechnologies.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220509170746.29893-1-devid.filoni@egluetechnologies.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 06:26:17 up 40 days, 16:55, 62 users, load average: 0.10, 0.09, 0.09 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Devid, On Mon, May 09, 2022 at 07:07:44PM +0200, Devid Antonio Filoni wrote: > Hello, > > If candump -x is used to dump CAN bus traffic on an interface while a J1939 > socket is sending multi-packet messages, then the DAT and CTL frames > show up as RX instead of TX. > > This patch series sets to generated struct sk_buff the owning struct sock > pointer so that the MSG_DONTROUTE flag can be set by recv functions. > > I'm not sure that j1939_session_skb_get is needed, I think that session->sk > could be directly passed as can_skb_set_owner parameter. This patch > is based on j1939_simple_txnext function which uses j1939_session_skb_get. > I can provide an additional patch to remove the calls to > j1939_session_skb_get function if you think they are not needed. Thank you for your patches. By testing it I noticed that there is a memory leak in current kernel and it seems to be even worse after this patches. Found by this test: https://github.com/linux-can/can-tests/blob/master/j1939/run_all.sh#L13 Can you please investigate it (or wait until I get time to do it). Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |