Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6287015rwn; Tue, 13 Sep 2022 01:43:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR53QM+IUxXd9GVfrjyUHEBqMOm47Q73vtP6r+u/oJ1RTSIC9uB1QgK1XpGo6WIWCTibBpgi X-Received: by 2002:aa7:c44b:0:b0:44e:e6aa:1558 with SMTP id n11-20020aa7c44b000000b0044ee6aa1558mr26107305edr.263.1663058622895; Tue, 13 Sep 2022 01:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663058622; cv=none; d=google.com; s=arc-20160816; b=Npw4d7qfCGVolVfpi21GEyc3bQTM1N+lV12XgWCfB5SES9fUOPwhp89qCMgzPH4ABL L0eCLRiqbncQFp3ZD69M5rDXNBb9HUmur7ptK0e/uTcVxoNmfejTIx2FuXNnQmzjNOBJ AOUB8TXswOm0TcPTBT0k9ntwy+As6U2xvRJlQNhKzqwauyA1lBgGEjvwO5hpdwuUsiD8 WUnTmMtSODlExf2SNRPW/oLKqrjnH8s4usl3rxQOD5uVyJan1Rs/ErgPuGT6RmbcUUBD WdqbhFWP20JU6GlrN1i0lwt7GpgpKLhdmw40c33Qx+D/mrj0PNP0jgWw6EGS292R2665 XKvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:organization:message-id:subject:cc:to:from:date :dkim-signature; bh=4ZZv5xCVVnY4y6rYdm7dulVMSoOLJlOJUQL0RHpll98=; b=dJ0/fJZodDPSTk6UxuYq1McVI4tILyI/73HF/6k05Nx63Wo7rtT8vuDWZ39tLV6SqN dAEL7hcuPrNPr1TMpslFPp+jfqYWfr3k0ZZHvpE04Qo8uLdvYEYUQ0uQ2sfuKucVQJOC eWcknaXYlShHlo7uR9QKkV2rZUfacsXqCpUIZovJTRJzRQooOoNgEmbTCcYk6cnrYRPB HK9Fp2T9xpCyt72rPzraxRBK3BbnY53hKXpBaVrxU0qHukjsG03lMNfEnSc12JacgWHR CxX/5ZrmHj/NY8IhlHSg7e1/xGZa6AIR3duBo48lP9OG9ONXRL71KQt/cySiUP44zVNX 4qQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qgXNIR8w; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a056402149200b004486942c31bsi8296067edv.274.2022.09.13.01.43.17; Tue, 13 Sep 2022 01:43:42 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qgXNIR8w; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230158AbiIMIP4 (ORCPT + 99 others); Tue, 13 Sep 2022 04:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230108AbiIMIPy (ORCPT ); Tue, 13 Sep 2022 04:15:54 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 229851E3D4; Tue, 13 Sep 2022 01:15:53 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id l12so13435241ljg.9; Tue, 13 Sep 2022 01:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :organization:message-id:subject:cc:to:from:date:from:to:cc:subject :date; bh=4ZZv5xCVVnY4y6rYdm7dulVMSoOLJlOJUQL0RHpll98=; b=qgXNIR8wAXAwWAJ6ChzaJEDc385w5xU5sTXNBOhucQiH7k5wNMoSwB+UxHaKcZZca9 9krr/Mg5miP2No270CtLt0pKUNXHRG8hI/g7x2kFsYLe96seFldobIDrg95T2EzxCE9p XRcO2Z2AZn2ZC5h6pCCyeoVQ0o1xSti1hCS6pAbqo74OKoOjaplPCCkzhhWK32Uxn8rz hPk7hBPwY29iCrn+8fgA85kxNCEWwJJdCtLAyOtczPRP3z0Swvxc2hHaNbtjxmgQ60+K ppmTlRRcp5OlWHj1x4Qp+HCuM04ogniDaKSHnU/V/AnzwsMCJL5OqEd6kdoyzaEL7fqu 89eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :organization:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date; bh=4ZZv5xCVVnY4y6rYdm7dulVMSoOLJlOJUQL0RHpll98=; b=xzjXcnFgMhSORDcCd8UmbW3m6amifJiotAwJG/zB83doZnYO9mpaVJ0uRgZzg2jJQC KIrHXAZRTGyjR+uKR6QtNZ1jHL7fm8iapnwqpcJHUvbNZCzhDCp1FcUbbPVHDDq3qwDW uc6A9ATP/qcm1IsOCnmi+5RP6x1FdUDs3VNdoYqC4hc9Cii0lAR/VRaecbkg2ARUJSr4 hOPQuAqcP7MOLyjPqD9A8w1tpxH81qsvqkfvBSfs2p7mTAhxYDVNjtBd9SoPYV1UfVbH MbTA8kb4EJDxWVCvXh16Tw3JbLooa7pgGyHspH0MsioTEENh/sJhGCckWLeBFpd5kzSU i+Cw== X-Gm-Message-State: ACgBeo1WD2felYGf+NRovvk8XyQg1xucXDeMOWSRUGWAHlhrU7mCsx/N FM43q7ooSZ60vCK2BNEaB9k= X-Received: by 2002:a2e:3e13:0:b0:26b:e6f1:ce14 with SMTP id l19-20020a2e3e13000000b0026be6f1ce14mr5735525lja.454.1663056951361; Tue, 13 Sep 2022 01:15:51 -0700 (PDT) Received: from wse-c0155 (c90-143-177-32.bredband.tele2.se. [90.143.177.32]) by smtp.gmail.com with ESMTPSA id p39-20020a05651213a700b0048a9e18ae67sm1554255lfa.84.2022.09.13.01.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 01:15:50 -0700 (PDT) Date: Tue, 13 Sep 2022 10:15:48 +0200 From: Casper Andersson To: Nathan Huckleberry Cc: Dan Carpenter , llvm@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Nathan Chancellor , Nick Desaulniers , Tom Rix , Horatiu Vultur , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sparx5: Fix return type of sparx5_port_xmit_impl Message-ID: <20220913081548.gmngjwuagbt63j7h@wse-c0155> Organization: Westermo Network Technologies AB References: <20220912214432.928989-1-nhuck@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220912214432.928989-1-nhuck@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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, On 2022-09-12 14:44, Nathan Huckleberry wrote: > The ndo_start_xmit field in net_device_ops is expected to be of type > netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev). > > The mismatched return type breaks forward edge kCFI since the underlying > function definition does not match the function hook definition. > > The return type of sparx5_port_xmit_impl should be changed from int to > netdev_tx_t. I noticed that the functions that assign the return value inside sparx5_port_xmit_impl also have return type int, which would ideally also be changed. But a bigger issue might be that sparx5_ptp_txtstamp_request and sparx5_inject (called inside sparx5_port_xmit_impl) returns -EBUSY (-16), when they should return NETDEV_TX_BUSY (16). If this is an issue then it also needs to be fixed. sparx5_fdma_xmit also has int return type, but always returns NETDEV_TX_OK right now. Best Regards, Casper