From patchwork Wed Mar 10 19:26:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 397193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6399FC433E0 for ; Wed, 10 Mar 2021 19:28:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B8AE64FDE for ; Wed, 10 Mar 2021 19:28:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232544AbhCJT1b (ORCPT ); Wed, 10 Mar 2021 14:27:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232958AbhCJT1F (ORCPT ); Wed, 10 Mar 2021 14:27:05 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CDE1C061760 for ; Wed, 10 Mar 2021 11:27:05 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id y13so9338634pfr.0 for ; Wed, 10 Mar 2021 11:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w3zvhwyhoSJ/TBvXM0V8rKoEJe+heF8go/8KszYVs88=; b=yih/H32T9oHwW19AcvT5TTbGF3lO8FVqjao88rwitqHLjs2Tg8bm5y4ZqPTM30UaPD c//5kBchuy19I7fk1ilMHTSScrHJm6yh4AgWv+XUmB8QWX2erqljE1rJFBb1njeq3cN9 C9fmFb8XQIBmox8XxNW9/2KQn8Zl2VJ48vCxOO2cKjg36UhH3EQSeACtphb5JXbK5NyU 4NHstX8/ivcrGMb740kLaB93gvdk3Ir9zD7Yg83MSW/TQGbgfm2aMI1bKcTYG3MYCQP7 kGYKYAvGLGd05AP8Qev4P4yXjuxBhKGnopWNsgvJb/xu/aKlY/MOBcz4RI6BZ+PXIsAd S82A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w3zvhwyhoSJ/TBvXM0V8rKoEJe+heF8go/8KszYVs88=; b=WXjFTn9lOxaTpmNcbPs7+GC26X5O0UmiuzfKsgQL3MWxg8qupewfsQXIXu18lPKQR2 lyVYqyLDG1uvanCArEKpbyKNQzpgZ6oBRlWOuDQzvKZzs+/mnG1F9W+VMCXTU1VlxWxE Q3kuR4lcKt4iP9vEjtuIOLSfoDz5B09LhnRXIrKyaXZAWdaGwy+2sMMJUUyUlcAan+6r Fkbtz7CONPBnI7J1ygw3TdJl+3By9eBq3LkH9jFz4ZWPTy2KzTXzJN+NBc7knbGNqpda kb6VAtKdLLj/t0ZWnfV9N3CIWqFj/i3a1/kakZzVjQhUxy8s2ZXV1z59ARMjw/KNJLTS aDcA== X-Gm-Message-State: AOAM533wqKFDp4Y4tbyziezY+0BPdHtnHeFKIhcDjRpUfzaob12qAmzD V5zXB5NaRe7Mj8588ZAU/ByU24Cv5yGWlA== X-Google-Smtp-Source: ABdhPJy+Jus8rPB3Nj9up9WXVupnzyWh8JMXZK+z1tFR49Ifc1gaT/clVpF3Ddk2D7it+R1G9lgzzQ== X-Received: by 2002:a63:1266:: with SMTP id 38mr3993939pgs.266.1615404424456; Wed, 10 Mar 2021 11:27:04 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id 12sm306393pgw.18.2021.03.10.11.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:27:03 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 4/6] ionic: simplify rx skb alloc Date: Wed, 10 Mar 2021 11:26:29 -0800 Message-Id: <20210310192631.20022-5-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310192631.20022-1-snelson@pensando.io> References: <20210310192631.20022-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove an unnecessary layer over rx skb allocation. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 63 +++++++------------ 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index c472c14b3a80..cd2540ff9251 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c @@ -10,12 +10,6 @@ #include "ionic_lif.h" #include "ionic_txrx.h" -static void ionic_rx_clean(struct ionic_queue *q, - struct ionic_desc_info *desc_info, - struct ionic_cq_info *cq_info, - void *cb_arg); - -static bool ionic_rx_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info); static bool ionic_tx_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info); @@ -40,32 +34,6 @@ static inline struct netdev_queue *q_to_ndq(struct ionic_queue *q) return netdev_get_tx_queue(q->lif->netdev, q->index); } -static struct sk_buff *ionic_rx_skb_alloc(struct ionic_queue *q, - unsigned int len, bool frags) -{ - struct ionic_lif *lif = q->lif; - struct ionic_rx_stats *stats; - struct net_device *netdev; - struct sk_buff *skb; - - netdev = lif->netdev; - stats = &q->lif->rxqstats[q->index]; - - if (frags) - skb = napi_get_frags(&q_to_qcq(q)->napi); - else - skb = napi_alloc_skb(&q_to_qcq(q)->napi, len); - - if (unlikely(!skb)) { - net_warn_ratelimited("%s: SKB alloc failed on %s!\n", - netdev->name, q->name); - stats->alloc_err++; - return NULL; - } - - return skb; -} - static void ionic_rx_buf_reset(struct ionic_buf_info *buf_info) { buf_info->page = NULL; @@ -76,12 +44,10 @@ static void ionic_rx_buf_reset(struct ionic_buf_info *buf_info) static int ionic_rx_page_alloc(struct ionic_queue *q, struct ionic_buf_info *buf_info) { - struct ionic_lif *lif = q->lif; + struct net_device *netdev = q->lif->netdev; struct ionic_rx_stats *stats; - struct net_device *netdev; struct device *dev; - netdev = lif->netdev; dev = q->dev; stats = q_to_rx_stats(q); @@ -162,21 +128,29 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q, struct ionic_cq_info *cq_info) { struct ionic_rxq_comp *comp = cq_info->cq_desc; + struct net_device *netdev = q->lif->netdev; struct ionic_buf_info *buf_info; + struct ionic_rx_stats *stats; struct device *dev = q->dev; struct sk_buff *skb; unsigned int i; u16 frag_len; u16 len; + stats = q_to_rx_stats(q); + buf_info = &desc_info->bufs[0]; len = le16_to_cpu(comp->len); prefetch(buf_info->page); - skb = ionic_rx_skb_alloc(q, len, true); - if (unlikely(!skb)) + skb = napi_get_frags(&q_to_qcq(q)->napi); + if (unlikely(!skb)) { + net_warn_ratelimited("%s: SKB alloc failed on %s!\n", + netdev->name, q->name); + stats->alloc_err++; return NULL; + } i = comp->num_sg_elems + 1; do { @@ -218,17 +192,25 @@ static struct sk_buff *ionic_rx_copybreak(struct ionic_queue *q, struct ionic_cq_info *cq_info) { struct ionic_rxq_comp *comp = cq_info->cq_desc; + struct net_device *netdev = q->lif->netdev; struct ionic_buf_info *buf_info; + struct ionic_rx_stats *stats; struct device *dev = q->dev; struct sk_buff *skb; u16 len; + stats = q_to_rx_stats(q); + buf_info = &desc_info->bufs[0]; len = le16_to_cpu(comp->len); - skb = ionic_rx_skb_alloc(q, len, false); - if (unlikely(!skb)) + skb = napi_alloc_skb(&q_to_qcq(q)->napi, len); + if (unlikely(!skb)) { + net_warn_ratelimited("%s: SKB alloc failed on %s!\n", + netdev->name, q->name); + stats->alloc_err++; return NULL; + } if (unlikely(!buf_info->page)) { dev_kfree_skb(skb); @@ -253,13 +235,12 @@ static void ionic_rx_clean(struct ionic_queue *q, void *cb_arg) { struct ionic_rxq_comp *comp = cq_info->cq_desc; + struct net_device *netdev = q->lif->netdev; struct ionic_qcq *qcq = q_to_qcq(q); struct ionic_rx_stats *stats; - struct net_device *netdev; struct sk_buff *skb; stats = q_to_rx_stats(q); - netdev = q->lif->netdev; if (comp->status) { stats->dropped++; From patchwork Wed Mar 10 19:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 397192 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83F45C4332D for ; Wed, 10 Mar 2021 19:28:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 306B964FC6 for ; Wed, 10 Mar 2021 19:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233719AbhCJT1b (ORCPT ); Wed, 10 Mar 2021 14:27:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233182AbhCJT1G (ORCPT ); Wed, 10 Mar 2021 14:27:06 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C62C061760 for ; Wed, 10 Mar 2021 11:27:06 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id q6-20020a17090a4306b02900c42a012202so8057856pjg.5 for ; Wed, 10 Mar 2021 11:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DG8uZxHo/gy5KMRZ/L9VunAlbH0cVegZatFW6irGEUw=; b=cEQDkDmeJQFZ54QaTCnzUvVaadSg2C3QpC5N/dcVszrpGTHWFJxXl2Q1d+Qw/cYwX1 74Gk007epZ9GsPilNthUEv83VwrJFooxxO/LsdVONxHhW+GXU+rDMKoLDnlNLeYR9bjo Rcs+1JqNrzclUS1f+3feXoJsOSFq6Tb0OZ9PwODgWQxxyZHlqHOVkaaU+PeOEWmogVdU 1G9vu2CiG7UeY1kNKUNUw8hXW5LTy04WykUgM5/1hHitSd8UC76Yg0P1+Chpt5N0VdB6 Co7T1dKQGTWavR+qL8CsLuAAhvNj38OoyZlthduYp07WuMJOPBy+WTT6xFguWzHnmrM9 E5gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DG8uZxHo/gy5KMRZ/L9VunAlbH0cVegZatFW6irGEUw=; b=dXOX6nKIKSaxUx7PPFuevThMxEi76YZv5raMSkBD/vrf9jbl6h8rKsEWE7iNX1Djjk B5qJFr3TKirxfLvEI24EZbIRIjDXEwUxhdO37v3wJ1M9DRpp8hlQPORPCMZoH7tctHYm pmiZzd1lILmMavMI5IvRpmbmKfiSW16Rd6bILlP4KHED0g1KAn2uH2Qxf4sfDqf+7tWW yU4v9qiJfvJM70/P0WdmuOULFFUdE+VZghGu/+ZMYT0bz8N/+BCJ14dtVskJBniTbEgp YWWBckkUML1Ig33TqkE7nZ+/+3t3BXRonqJLdfZEQDSiGKn+1Z54GsQZShZpmEFr1W8v /KIw== X-Gm-Message-State: AOAM531SoeUZb/wP6D9xgfIBpgKnGcaqMmRfoZvpRvIIp/IAqxRMII22 njdMtPWIagCDJZ9ptxYPeOglPDEk84Q6eg== X-Google-Smtp-Source: ABdhPJxwOAgtsOOsY5KWGog2W4UwIV1vob620gSOjd1gTABaZm/7pgTnjTXeBYROPPtui75wQl4eSg== X-Received: by 2002:a17:90a:c08a:: with SMTP id o10mr5090932pjs.67.1615404425751; Wed, 10 Mar 2021 11:27:05 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id 12sm306393pgw.18.2021.03.10.11.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:27:05 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 5/6] ionic: rebuild debugfs on qcq swap Date: Wed, 10 Mar 2021 11:26:30 -0800 Message-Id: <20210310192631.20022-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310192631.20022-1-snelson@pensando.io> References: <20210310192631.20022-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org With a reconfigure of each queue is needed a rebuild of the matching debugfs information. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 6f8a5daaadfa..48d3c7685b6c 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -2204,6 +2204,9 @@ static void ionic_swap_queues(struct ionic_qcq *a, struct ionic_qcq *b) swap(a->cq_base, b->cq_base); swap(a->cq_base_pa, b->cq_base_pa); swap(a->cq_size, b->cq_size); + + ionic_debugfs_del_qcq(a); + ionic_debugfs_add_qcq(a->q.lif, a); } int ionic_reconfigure_queues(struct ionic_lif *lif, From patchwork Wed Mar 10 19:26:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 397191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A27D9C4332B for ; Wed, 10 Mar 2021 19:28:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C89064FD5 for ; Wed, 10 Mar 2021 19:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233729AbhCJT1c (ORCPT ); Wed, 10 Mar 2021 14:27:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbhCJT1H (ORCPT ); Wed, 10 Mar 2021 14:27:07 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A06DC061760 for ; Wed, 10 Mar 2021 11:27:07 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id ha17so1432718pjb.2 for ; Wed, 10 Mar 2021 11:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8dftNfGs7u/TavY2VL10CRoiQcorWiSHQAURk/X4aiU=; b=Y4ggoDjjzc6uk67uZSs+wCw3bZpQLiBpKorhRpzSW015f7lxMfrj/nPdf+QkJsTuTI 9riY2UD2HjMvn5yEBNnzlf1D22ewBxk4OZ8d5UtWKmOcLovGDfBVfi/48irDvHAMMnJ1 A9gb1Z3pqsk0ZnAWfX+AZmuxdEUx9AkfZyyqCgmGW5xH7XUHaPr617UilU7Jvmfm8pl0 wufYSP1jngZ+VjuGU3/q3hHO7oRdqerOJduKOgxQBAGWn7/xZzM4FlWw3ciNHGlmq4Qh B1Dr9cxK2m09gQvdZW+tYyrQBx+wOeyQwzOcDTF9R9BYHg78LhRhDKVx1ddHVtU5tHYv WULg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8dftNfGs7u/TavY2VL10CRoiQcorWiSHQAURk/X4aiU=; b=X8cWc6JqcWn08VDLQ68mvOo+SCyWIGLtHIdVGdsItk4LMke/DORJH3ImnNTyp+znaB 4f4KPzUJkNLWmev5TSTK5vSEoAZzMh0ucs63h4vO7E2LXCzA1jK51CHLKoXvvALt6Ywo xGsQwqpBbIJZ4q89uk7dgX7mhOcC4M6qR6ljGfKGqPT/QImOKC1FGcJwKF+0NgUj3phY HNkUe2dlfOPPwtgQcYlMAQXqet5k0gQZI2cKuyztTd2l1nWCVB3k/r9HFmJacxngP5NK FD47oTpOAPC4iheYqgKt3TAyw+rB2gz7dvMeM9KpQK/CqNoa11VgO4bZU0mC2UTAc3AY iPrg== X-Gm-Message-State: AOAM530FhhDmy7dHqtc2pSZIjTdCRW7k9fkbdIcVAj41hxV2WjLfPVgj zAYwvuaum46E4ay3Huji2oblc8bdkEabXw== X-Google-Smtp-Source: ABdhPJyPQRzPg9V3c1YTz6/zL5vdlx4DIlINH0O9fw85OIB079jr3k+K/2Q5Q5RQabHX8716B2SDKw== X-Received: by 2002:a17:90b:ecc:: with SMTP id gz12mr5030968pjb.79.1615404426762; Wed, 10 Mar 2021 11:27:06 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id 12sm306393pgw.18.2021.03.10.11.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:27:06 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net-next 6/6] ionic: simplify use of completion types Date: Wed, 10 Mar 2021 11:26:31 -0800 Message-Id: <20210310192631.20022-7-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310192631.20022-1-snelson@pensando.io> References: <20210310192631.20022-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Make better use of our struct types and type checking by passing the actual Rx or Tx completion type rather than a generic void pointer type. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index cd2540ff9251..c63e6e7aa47b 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c @@ -125,9 +125,8 @@ static bool ionic_rx_buf_recycle(struct ionic_queue *q, static struct sk_buff *ionic_rx_frags(struct ionic_queue *q, struct ionic_desc_info *desc_info, - struct ionic_cq_info *cq_info) + struct ionic_rxq_comp *comp) { - struct ionic_rxq_comp *comp = cq_info->cq_desc; struct net_device *netdev = q->lif->netdev; struct ionic_buf_info *buf_info; struct ionic_rx_stats *stats; @@ -155,9 +154,6 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q, i = comp->num_sg_elems + 1; do { if (unlikely(!buf_info->page)) { - struct napi_struct *napi = &q_to_qcq(q)->napi; - - napi->skb = NULL; dev_kfree_skb(skb); return NULL; } @@ -189,9 +185,8 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q, static struct sk_buff *ionic_rx_copybreak(struct ionic_queue *q, struct ionic_desc_info *desc_info, - struct ionic_cq_info *cq_info) + struct ionic_rxq_comp *comp) { - struct ionic_rxq_comp *comp = cq_info->cq_desc; struct net_device *netdev = q->lif->netdev; struct ionic_buf_info *buf_info; struct ionic_rx_stats *stats; @@ -234,7 +229,7 @@ static void ionic_rx_clean(struct ionic_queue *q, struct ionic_cq_info *cq_info, void *cb_arg) { - struct ionic_rxq_comp *comp = cq_info->cq_desc; + struct ionic_rxq_comp *comp = cq_info->rxcq; struct net_device *netdev = q->lif->netdev; struct ionic_qcq *qcq = q_to_qcq(q); struct ionic_rx_stats *stats; @@ -251,9 +246,9 @@ static void ionic_rx_clean(struct ionic_queue *q, stats->bytes += le16_to_cpu(comp->len); if (le16_to_cpu(comp->len) <= q->lif->rx_copybreak) - skb = ionic_rx_copybreak(q, desc_info, cq_info); + skb = ionic_rx_copybreak(q, desc_info, comp); else - skb = ionic_rx_frags(q, desc_info, cq_info); + skb = ionic_rx_frags(q, desc_info, comp); if (unlikely(!skb)) { stats->dropped++; @@ -309,7 +304,7 @@ static void ionic_rx_clean(struct ionic_queue *q, static bool ionic_rx_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info) { - struct ionic_rxq_comp *comp = cq_info->cq_desc; + struct ionic_rxq_comp *comp = cq_info->rxcq; struct ionic_queue *q = cq->bound_q; struct ionic_desc_info *desc_info; @@ -661,7 +656,7 @@ static void ionic_tx_clean(struct ionic_queue *q, static bool ionic_tx_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info) { - struct ionic_txq_comp *comp = cq_info->cq_desc; + struct ionic_txq_comp *comp = cq_info->txcq; struct ionic_queue *q = cq->bound_q; struct ionic_desc_info *desc_info; u16 index;