Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp184406rwb; Thu, 1 Dec 2022 00:27:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6EooJ35s5ONROqYpWrKS812bfIVds6Wy5rvUfnR65JeHShXcgmi90mP0nTtsBwZPBBxhDd X-Received: by 2002:a17:902:74c5:b0:189:5e36:c051 with SMTP id f5-20020a17090274c500b001895e36c051mr35007890plt.174.1669883278749; Thu, 01 Dec 2022 00:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669883278; cv=none; d=google.com; s=arc-20160816; b=TLgQ2xqPmffF/fWxGUDm8iK+JPjWAYFKtLC3JIn4WtG0joltt1V+4nJ3Eg7L9cft1b 1E6sBFLNtbPSdHXOdRRaIGTDrHlVx3qUFl18YJVTSwQBVXotqcfN2s9Bthyl2Iygm7Sj wlX+fn7OJyexZZVnYtOYCMMvZGmAU9C+hm3rcsni/i3bDNkXcOrjtbFOWa17HlKpI6SF YpFbKNylIBnmhuI5C3oQI4tOYOFAFmxLntAnKE5Rsx2t37iR9cm9BNBqpjoLxoi5aON+ Ydf7Ja+UejS0VocE3+mQgaDq62T1yKNlrWAFhbsJ5WEh9tZ2N+FAR9msDIB81I3qdEN/ FhXg== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=HoZfHuWmXoy880B43xTLkSmoxMGao9hV9O/tvW2pPx0=; b=yTqql9KpKdJLMF8OGIPUY9fM1ec/l6pve8hyzOKIr1EMa9mkMClo8zGOd2GA4+0F0x abRNQncb/BoXqCyQjX55X6dfGyHbM8CYM0j8QoODIOO3PRSnuPC2nWWxxA9VqEedjDkZ s8ebXi4UPZ35nGvd5OCt+95UR2olRa8XaCVhae2gJvd18wkKc8PSFuQUsT2VuaPMBYvG 0PgP3/Uov4sZ12+wSGUz7IuAjhpB5S1ro4G4Bf1csORtUVkyqN14wSm0y7oVqmb5XDDi NJPhcSGn1EBuF+rLxPpMOBWcEiVtG1FyKAwm9HIBinn2y10BhsJl9dgRHTgpXTL2uSOY Y0sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VVqPCIb+; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 37-20020a630f65000000b0047767ded526si3967584pgp.100.2022.12.01.00.27.48; Thu, 01 Dec 2022 00:27:58 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=VVqPCIb+; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiLAILc (ORCPT + 82 others); Thu, 1 Dec 2022 03:11:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbiLAILb (ORCPT ); Thu, 1 Dec 2022 03:11:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BF920344; Thu, 1 Dec 2022 00:11:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 44231B81D96; Thu, 1 Dec 2022 08:11:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69D76C433D6; Thu, 1 Dec 2022 08:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669882281; bh=pacK4oSuE/b5c5EwaJOqh3ES+VasIVXQPJNvmrtoSaA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VVqPCIb+KVG0NsfqtbHx1i9X6A/HAYRu2TVGd4K8nnnkh5JXoDPdeicaeF7kueP0y MphPck1WjvB/FpPEGutDzpBjpSN5yJbud5qvScnwqtHk3Yjkk1RuocH8muw4Y35Tq/ cy4tkSeYG13jSX8z7wuthkCNY2MCpdpv7pFEn7iC5AxC7eyJMN39dxxkleSCTCW+tG +5RMNG3i68kNRnTkKoy9pKn2d1HQrptZkSuPqNML5zT4F7otlyTgCTsBBMMwiwnKUG Vw5pBwbvi4jHYIAlRA2Lg7h1FarJjRHiQmJACfs7QrfEg5LNXhMaiFlx4+1hSFZ+ik eoBLw76Ch/nzw== Date: Thu, 1 Dec 2022 10:11:16 +0200 From: Leon Romanovsky To: Veerasenareddy Burru Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Liron Himi , Abhijit Ayarekar , Sathesh B Edara , Satananda Burla , "linux-doc@vger.kernel.org" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: Re: [EXT] Re: [PATCH net-next v2 2/9] octeon_ep: poll for control messages Message-ID: References: <20221129130933.25231-1-vburru@marvell.com> <20221129130933.25231-3-vburru@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Wed, Nov 30, 2022 at 03:44:30PM +0000, Veerasenareddy Burru wrote: > > > > -----Original Message----- > > From: Leon Romanovsky > > Sent: Wednesday, November 30, 2022 1:30 AM > > To: Veerasenareddy Burru > > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Liron Himi > > ; Abhijit Ayarekar ; Sathesh > > B Edara ; Satananda Burla ; > > linux-doc@vger.kernel.org; David S. Miller ; Eric > > Dumazet ; Jakub Kicinski ; > > Paolo Abeni > > Subject: [EXT] Re: [PATCH net-next v2 2/9] octeon_ep: poll for control > > messages > > > > External Email > > > > ---------------------------------------------------------------------- > > On Tue, Nov 29, 2022 at 05:09:25AM -0800, Veerasenareddy Burru wrote: > > > Poll for control messages until interrupts are enabled. > > > All the interrupts are enabled in ndo_open(). > > > > So what are you saying if I have your device and didn't enable network > > device, you will poll forever? > Yes, Leon. It will poll periodically until network interface is enabled. I don't know if it is acceptable behaviour in netdev, but it doesn't sound right to me. What type of control messages will be sent by FW, which PF should listen to them? > > > > > Add ability to listen for notifications from firmware before ndo_open(). > > > Once interrupts are enabled, this polling is disabled and all the > > > messages are processed by bottom half of interrupt handler. > > > > > > Signed-off-by: Veerasenareddy Burru > > > Signed-off-by: Abhijit Ayarekar > > > --- > > > v1 -> v2: > > > * removed device status oct->status, as it is not required with the > > > modified implementation in 0001-xxxx.patch > > > > > > .../marvell/octeon_ep/octep_cn9k_pf.c | 49 +++++++++---------- > > > .../ethernet/marvell/octeon_ep/octep_main.c | 35 +++++++++++++ > > > .../ethernet/marvell/octeon_ep/octep_main.h | 11 ++++- > > > .../marvell/octeon_ep/octep_regs_cn9k_pf.h | 4 ++ > > > 4 files changed, 71 insertions(+), 28 deletions(-) > > > > > > diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_cn9k_pf.c > > > b/drivers/net/ethernet/marvell/octeon_ep/octep_cn9k_pf.c > > > index 6ad88d0fe43f..ace2dfd1e918 100644 > > > --- a/drivers/net/ethernet/marvell/octeon_ep/octep_cn9k_pf.c > > > +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_cn9k_pf.c > > > @@ -352,27 +352,36 @@ static void > > octep_setup_mbox_regs_cn93_pf(struct octep_device *oct, int q_no) > > > mbox->mbox_read_reg = oct->mmio[0].hw_addr + > > > CN93_SDP_R_MBOX_VF_PF_DATA(q_no); } > > > > > > -/* Mailbox Interrupt handler */ > > > -static void cn93_handle_pf_mbox_intr(struct octep_device *oct) > > > +/* Process non-ioq interrupts required to keep pf interface running. > > > + * OEI_RINT is needed for control mailbox */ static int > > > +octep_poll_non_ioq_interrupts_cn93_pf(struct octep_device *oct) > > > { > > > - u64 mbox_int_val = 0ULL, val = 0ULL, qno = 0ULL; > > > + u64 reg0; > > > + int handled = 0; > > > > Reversed Christmas tree. > Thanks for the feedback. Will revise the patch. It is applicable to all patches. And please fix your email client to properly add blank lines between replies. Thanks > > > > Thanks