Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4634195pxb; Wed, 20 Apr 2022 07:16:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY0yBgZI2Bv4i0fwSwOhsAwlQWlb49R6t+jBB8M13qONnqJ9tOFF/gtldEfh5kbA07PEAh X-Received: by 2002:a05:6e02:1bc7:b0:2cc:5965:ea80 with SMTP id x7-20020a056e021bc700b002cc5965ea80mr1681987ilv.221.1650464202572; Wed, 20 Apr 2022 07:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650464202; cv=none; d=google.com; s=arc-20160816; b=aFvPWmdYebCG8+tbJJhl7xAeqHEbSqpclP1S4PMuiKqrTut4zHMso6wCR3i2bdvS1c Z1qg8KeOPU5+w/VkKISSE+nylMNBtM/jpa/Hkl2AcQzcgEpsO10DIDL+0fjt8PJVGgna fGi72dHa4iNQCvlQxybdbj3VQ0AB+VaMiySi76MESl7mTZirJJ8mblRT8BrKr9f1FDAD +IcMTt1WKolHowMh0vNv67hIgBvaCsmTqK3lt5wtVVxR8yYvIEUF/wrnQRWOuI6H7A7O 9v7xXudl76JdUDh0N225l51r67CLY8VPSV9o+H2GGcitRjZqodbzpNiew9Lr/9KsQDEP 1IiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=cPQdo1n5l3g+FG7p6p/UnrjWx3LEaiHe+gsvan0suQg=; b=itGFUrrrZ29J8CPAjmbBNxNUaPDu+GZ6vHcfzkzAzsiteVw9vRaKBJiXJ9ytly4dTp 7e9DSaJ7xmw/6eNdXy0dL3LGhWdGVr69qq0tyMa0t7hpvbNQCvpyE3QXcCEPpBbo8bS4 ehXzacV5m4f6RY/PYESjzfAOIS/wq27/zpDLEfiEAP2Y8yu7ZmgwC0u+MXKJDV8Lfs2N wvTy9OHRpYVLuVcTUJxcYTAH2oHMw5BbRnlDE2B62/4Ul3meWbnxZdVqf2bMEXT7lAg5 XWE7U8JC9EX7EKabKFUGMJ01ojGncNIX6EFCB/HptqF00J9ZdjJs0+M9m940HTwA/GdX AdSw== 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 o7-20020a056602224700b006531f70178bsi973259ioo.58.2022.04.20.07.16.24; Wed, 20 Apr 2022 07:16: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; 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 S1348786AbiDSOXH (ORCPT + 99 others); Tue, 19 Apr 2022 10:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353181AbiDSOWR (ORCPT ); Tue, 19 Apr 2022 10:22:17 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8140013CDB; Tue, 19 Apr 2022 07:19:33 -0700 (PDT) Received: from [192.168.0.7] (ip5f5ae90d.dynamic.kabel-deutschland.de [95.90.233.13]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 7D81461CCD785; Tue, 19 Apr 2022 16:19:30 +0200 (CEST) Message-ID: Date: Tue, 19 Apr 2022 16:19:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [Intel-wired-lan] [PATCH 2/2] Trigger proper interrupts in igc_xsk_wakeup Content-Language: en-US To: Jeff Evanson Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jeff.evanson@qsc.com References: <20220415210546.11294-1-jeff.evanson@qsc.com> From: Paul Menzel In-Reply-To: <20220415210546.11294-1-jeff.evanson@qsc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 Dear Jeff, Thank you for your patch. Am 15.04.22 um 23:05 schrieb Jeff Evanson: 1. Add a From tag(?), so your company instead of gmail.com email is used? 2. Please add a prefix to the commit message summary. See `git log --oneline drivers/net/ethernet/igc` for examples. > in igc_xsk_wakeup, trigger the proper interrupt based on whether flags > contains XDP_WAKEUP_RX and/or XDP_WAKEUP_TX Nit. Please add a dot/period to the end of sentences. Can you please add a paragraph on what system you experienced the problem, and how to verify your fix? > Signed-off-by: Jeff Evanson > --- > drivers/net/ethernet/intel/igc/igc_main.c | 36 +++++++++++++++++------ > 1 file changed, 27 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c > index a36a18c84aeb..d706de95dc06 100644 > --- a/drivers/net/ethernet/intel/igc/igc_main.c > +++ b/drivers/net/ethernet/intel/igc/igc_main.c > @@ -6073,7 +6073,7 @@ static void igc_trigger_rxtxq_interrupt(struct igc_adapter *adapter, > int igc_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags) > { > struct igc_adapter *adapter = netdev_priv(dev); > - struct igc_q_vector *q_vector; > + struct igc_q_vector *txq_vector = 0, *rxq_vector = 0; Should you use NULL instead of 0? Kind regards, Paul > struct igc_ring *ring; > > if (test_bit(__IGC_DOWN, &adapter->state)) > @@ -6082,17 +6082,35 @@ int igc_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags) > if (!igc_xdp_is_enabled(adapter)) > return -ENXIO; > > - if (queue_id >= adapter->num_rx_queues) > - return -EINVAL; > + if (flags & XDP_WAKEUP_RX) { > + if (queue_id >= adapter->num_rx_queues) > + return -EINVAL; > > - ring = adapter->rx_ring[queue_id]; > + ring = adapter->rx_ring[queue_id]; > + if (!ring->xsk_pool) > + return -ENXIO; > > - if (!ring->xsk_pool) > - return -ENXIO; > + rxq_vector = ring->q_vector; > + } > + > + if (flags & XDP_WAKEUP_TX) { > + if (queue_id >= adapter->num_tx_queues) > + return -EINVAL; > + > + ring = adapter->tx_ring[queue_id]; > + if (!ring->xsk_pool) > + return -ENXIO; > + > + txq_vector = ring->q_vector; > + } > + > + if (rxq_vector && > + !napi_if_scheduled_mark_missed(&rxq_vector->napi)) > + igc_trigger_rxtxq_interrupt(adapter, rxq_vector); > > - q_vector = adapter->q_vector[queue_id]; > - if (!napi_if_scheduled_mark_missed(&q_vector->napi)) > - igc_trigger_rxtxq_interrupt(adapter, q_vector); > + if (txq_vector && txq_vector != rxq_vector && > + !napi_if_scheduled_mark_missed(&txq_vector->napi)) > + igc_trigger_rxtxq_interrupt(adapter, txq_vector); > > return 0; > }