From patchwork Fri Jan 15 09:06:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaskar Upadhaya X-Patchwork-Id: 12021951 X-Patchwork-Delegate: kuba@kernel.org 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 9D908C433E6 for ; Fri, 15 Jan 2021 09:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 695B523434 for ; Fri, 15 Jan 2021 09:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbhAOJHK (ORCPT ); Fri, 15 Jan 2021 04:07:10 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:50012 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727020AbhAOJHH (ORCPT ); Fri, 15 Jan 2021 04:07:07 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10F8xcIv013563; Fri, 15 Jan 2021 01:06:25 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=+Hvy1jKkYVAyMBS9UTbowqwD7DX9YEVH/j6b25q/5BY=; b=HjoGBdXTWHMMCyvl3Q5Ab31GDHUeoJ/IO1thH6+pr+6sKw6+hlKgmUN/PCkFEeBUcJKh c9yttPm5kBmgwfiokMk5I4thNKMhY9Kh5iou1cG/6Tl40DXZhiUYaLfG7n1ZNpHq0g0B uEv0U5JPchxGurBulJZ6Wh1TOhyW1qpOhZ6M2c4RLhubeBBvqnm8UQPTmUjYSr8AtLel bM4JXfI/tzjkbWwv0jeYJJOV2XUkrMX17/2C8bJeLKBoCbmhZeaqjTlc9K4quwK6jUZQ L3SrOO5XgrwNWIA2gifvE9Qhat1Ru36+2X/xEetFHOMqD5VcrqTRYfd7JE7gbalGpUnG VQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 35ycvq2311-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 15 Jan 2021 01:06:24 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 01:06:22 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 01:06:22 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 15 Jan 2021 01:06:22 -0800 Received: from dc5-eodlnx05.marvell.com (dc5-eodlnx05.marvell.com [10.69.113.147]) by maili.marvell.com (Postfix) with ESMTP id 4BC533F7040; Fri, 15 Jan 2021 01:06:22 -0800 (PST) From: Bhaskar Upadhaya To: , , , CC: Subject: [PATCH net-next 1/3] qede: add netpoll support for qede driver Date: Fri, 15 Jan 2021 01:06:08 -0800 Message-ID: <1610701570-29496-2-git-send-email-bupadhaya@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com> References: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-15_06:2021-01-15,2021-01-15 signatures=0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add net poll controller support to transmit kernel printks over UDP Signed-off-by: Bhaskar Upadhaya Signed-off-by: Igor Russkikh Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qede/qede.h | 4 ++++ drivers/net/ethernet/qlogic/qede/qede_fp.c | 14 ++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 3 +++ 3 files changed, 21 insertions(+) diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h index 3efc5899f656..ac12e5beb596 100644 --- a/drivers/net/ethernet/qlogic/qede/qede.h +++ b/drivers/net/ethernet/qlogic/qede/qede.h @@ -582,6 +582,10 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, void qede_forced_speed_maps_init(void); +#ifdef CONFIG_NET_POLL_CONTROLLER +void qede_poll_controller(struct net_device *dev); +#endif + #define RX_RING_SIZE_POW 13 #define RX_RING_SIZE ((u16)BIT(RX_RING_SIZE_POW)) #define NUM_RX_BDS_MAX (RX_RING_SIZE - 1) diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c index a2494bf85007..a626f1f45212 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_fp.c +++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c @@ -1804,3 +1804,17 @@ netdev_features_t qede_features_check(struct sk_buff *skb, return features; } + +#ifdef CONFIG_NET_POLL_CONTROLLER +/* This is used by netconsole to send skbs without having to re-enable + * interrupts.It's not called while the normal interrupt routine is executing. + */ +void qede_poll_controller(struct net_device *dev) +{ + struct qede_dev *edev = netdev_priv(dev); + int i; + + for_each_queue(i) + napi_schedule(&edev->fp_array[i].napi); +} +#endif diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index 05e3a3b60269..2ff6c49de745 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -644,6 +644,9 @@ static const struct net_device_ops qede_netdev_ops = { .ndo_set_rx_mode = qede_set_rx_mode, .ndo_set_mac_address = qede_set_mac_addr, .ndo_validate_addr = eth_validate_addr, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = qede_poll_controller, +#endif .ndo_change_mtu = qede_change_mtu, .ndo_do_ioctl = qede_ioctl, .ndo_tx_timeout = qede_tx_timeout, From patchwork Fri Jan 15 09:06:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaskar Upadhaya X-Patchwork-Id: 12021955 X-Patchwork-Delegate: kuba@kernel.org 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 BC361C433E9 for ; Fri, 15 Jan 2021 09:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 987A32339E for ; Fri, 15 Jan 2021 09:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727310AbhAOJHI (ORCPT ); Fri, 15 Jan 2021 04:07:08 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:56406 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbhAOJHH (ORCPT ); Fri, 15 Jan 2021 04:07:07 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10F8xbJC013544; Fri, 15 Jan 2021 01:06:24 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=PxvV52RAe3ey3uQBB7fjLd0tto6rfqlTF3yG/HlNby4=; b=lIjSK/QQ86YAsA3xKVqslDufe3WT8XakDHSgwYEEM1JlCaLaP+1jFUg1r9t4K1vjXGjk EILHr1ua8csL4bvdaph5O31iEuoAoO9dNeQsWYx3y23TSWXV32ahUImB0sQcTx1+6cVo ukVvioezM4dQ07sKF4B/Npk4YumGucVe4YtenT5woPe5l6udIdVtxfaGXA8tfTCkv5OO flKwhUAYMEUieXPirsDHCeUsSEr0H+H+OrKWonFDKVurv/MMbps0eV78NsdiCV7ybuko 5o1jVNpHgJkGe0jRwxHu+A4WF9rR6W/WXglNTk8E623BSINCzhfoBy86QRwDVN2bYNHS oA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 35ycvq2310-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 15 Jan 2021 01:06:24 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 01:06:22 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 15 Jan 2021 01:06:22 -0800 Received: from dc5-eodlnx05.marvell.com (dc5-eodlnx05.marvell.com [10.69.113.147]) by maili.marvell.com (Postfix) with ESMTP id 4EF7A3F7043; Fri, 15 Jan 2021 01:06:22 -0800 (PST) From: Bhaskar Upadhaya To: , , , CC: Subject: [PATCH net-next 2/3] qede: add per queue coalesce support for qede driver Date: Fri, 15 Jan 2021 01:06:09 -0800 Message-ID: <1610701570-29496-3-git-send-email-bupadhaya@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com> References: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-15_06:2021-01-15,2021-01-15 signatures=0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org per queue coalescing allows better and more finegrained control over interrupt rates. Signed-off-by: Bhaskar Upadhaya Signed-off-by: Igor Russkikh Signed-off-by: Ariel Elior --- .../net/ethernet/qlogic/qede/qede_ethtool.c | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index bedbb85a179a..522736968496 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -2105,6 +2105,125 @@ static int qede_get_dump_data(struct net_device *dev, return rc; } +static int qede_set_per_coalesce(struct net_device *dev, + u32 queue, + struct ethtool_coalesce *coal) +{ + struct qede_dev *edev = netdev_priv(dev); + struct qede_fastpath *fp; + u16 rxc, txc; + int rc = 0; + + if (coal->rx_coalesce_usecs > QED_COALESCE_MAX || + coal->tx_coalesce_usecs > QED_COALESCE_MAX) { + DP_INFO(edev, + "Can't support requested %s coalesce value [max supported value %d]\n", + coal->rx_coalesce_usecs > QED_COALESCE_MAX ? "rx" + : "tx", + QED_COALESCE_MAX); + return -EINVAL; + } + + rxc = (u16)coal->rx_coalesce_usecs; + txc = (u16)coal->tx_coalesce_usecs; + + __qede_lock(edev); + if (queue >= edev->num_queues) { + DP_INFO(edev, "Invalid queue\n"); + rc = -EINVAL; + goto out; + } + + if (edev->state != QEDE_STATE_OPEN) { + rc = -EINVAL; + goto out; + } + + fp = &edev->fp_array[queue]; + + if (edev->fp_array[queue].type & QEDE_FASTPATH_RX) { + rc = edev->ops->common->set_coalesce(edev->cdev, + rxc, 0, + fp->rxq->handle); + if (rc) { + DP_INFO(edev, + "Set RX coalesce error, rc = %d\n", rc); + goto out; + } + } + + if (edev->fp_array[queue].type & QEDE_FASTPATH_TX) { + rc = edev->ops->common->set_coalesce(edev->cdev, + 0, txc, + fp->txq->handle); + if (rc) { + DP_INFO(edev, + "Set TX coalesce error, rc = %d\n", rc); + goto out; + } + } +out: + __qede_unlock(edev); + + return rc; +} + +static int qede_get_per_coalesce(struct net_device *dev, + u32 queue, + struct ethtool_coalesce *coal) +{ + void *rx_handle = NULL, *tx_handle = NULL; + struct qede_dev *edev = netdev_priv(dev); + u16 rx_coal, tx_coal, rc = 0; + struct qede_fastpath *fp; + + rx_coal = QED_DEFAULT_RX_USECS; + tx_coal = QED_DEFAULT_TX_USECS; + + memset(coal, 0, sizeof(struct ethtool_coalesce)); + + __qede_lock(edev); + if (queue >= edev->num_queues) { + DP_INFO(edev, "Invalid queue\n"); + rc = -EINVAL; + goto out; + } + + if (edev->state != QEDE_STATE_OPEN) { + rc = -EINVAL; + goto out; + } + + fp = &edev->fp_array[queue]; + + if (fp->type & QEDE_FASTPATH_RX) + rx_handle = fp->rxq->handle; + + rc = edev->ops->get_coalesce(edev->cdev, &rx_coal, + rx_handle); + if (rc) { + DP_INFO(edev, "Read Rx coalesce error\n"); + goto out; + } + + fp = &edev->fp_array[queue]; + if (fp->type & QEDE_FASTPATH_TX) + tx_handle = fp->txq->handle; + + rc = edev->ops->get_coalesce(edev->cdev, &tx_coal, + tx_handle); + if (rc) + DP_INFO(edev, "Read Tx coalesce error\n"); + +out: + __qede_unlock(edev); + + coal->rx_coalesce_usecs = rx_coal; + coal->tx_coalesce_usecs = tx_coal; + + return rc; +} + static const struct ethtool_ops qede_ethtool_ops = { .supported_coalesce_params = ETHTOOL_COALESCE_USECS, .get_link_ksettings = qede_get_link_ksettings, @@ -2148,6 +2267,8 @@ static const struct ethtool_ops qede_ethtool_ops = { .set_fecparam = qede_set_fecparam, .get_tunable = qede_get_tunable, .set_tunable = qede_set_tunable, + .get_per_queue_coalesce = qede_get_per_coalesce, + .set_per_queue_coalesce = qede_set_per_coalesce, .flash_device = qede_flash_device, .get_dump_flag = qede_get_dump_flag, .get_dump_data = qede_get_dump_data, @@ -2177,6 +2298,8 @@ static const struct ethtool_ops qede_vf_ethtool_ops = { .set_rxfh = qede_set_rxfh, .get_channels = qede_get_channels, .set_channels = qede_set_channels, + .get_per_queue_coalesce = qede_get_per_coalesce, + .set_per_queue_coalesce = qede_set_per_coalesce, .get_tunable = qede_get_tunable, .set_tunable = qede_set_tunable, }; From patchwork Fri Jan 15 09:06:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaskar Upadhaya X-Patchwork-Id: 12021953 X-Patchwork-Delegate: kuba@kernel.org 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 A4632C433E0 for ; Fri, 15 Jan 2021 09:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F9B723444 for ; Fri, 15 Jan 2021 09:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728483AbhAOJHL (ORCPT ); Fri, 15 Jan 2021 04:07:11 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:2206 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbhAOJHJ (ORCPT ); Fri, 15 Jan 2021 04:07:09 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10F8xcJ0013563; Fri, 15 Jan 2021 01:06:26 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=vV5ZH/mzyRj1yVyCgZC+VvWBQs2yrBz3oAPXgy5DEbs=; b=UfXUDIqL5qDEe463qHyZggC3ry01sNmD8+KkjTRRyEqLkbX1EzugPdd7R4sLC8rPYRlA W1u3/gT60ew8itxGOQyIZRm0VhyKTlcLSbrUBOSm5jvdpals+io8FadnasxFyF4Y48/y 1iCJvZM7xec7IfFGeAMjp6q3FmwyaaudrU23FX+MC0G895HNA6Ga5yWrucuOY/OO2XvD EVEYFiJZ/bq0EZGwzNBi+HWys41KdBQqVIGJLexODCcX2uQ6JlhLNyKz5RuvMW4wHtw6 i1t+uZtENcPqxFpuQDVuGhVPQ1uJu4yQjTUuOsCz1cnTYxWs2oaiG8YshEJwtgOIGFrr +g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 35ycvq2311-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 15 Jan 2021 01:06:26 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 01:06:24 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 01:06:22 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 15 Jan 2021 01:06:22 -0800 Received: from dc5-eodlnx05.marvell.com (dc5-eodlnx05.marvell.com [10.69.113.147]) by maili.marvell.com (Postfix) with ESMTP id 51CA03F7044; Fri, 15 Jan 2021 01:06:22 -0800 (PST) From: Bhaskar Upadhaya To: , , , CC: Subject: [PATCH net-next 3/3] qede: set default per queue rx/tx usecs coalescing parameters Date: Fri, 15 Jan 2021 01:06:10 -0800 Message-ID: <1610701570-29496-4-git-send-email-bupadhaya@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com> References: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-15_06:2021-01-15,2021-01-15 signatures=0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Here we do the initialization of coalescing values on load. Although the default device values are the same - explicit config is better visible. Signed-off-by: Bhaskar Upadhaya Signed-off-by: Igor Russkikh Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 3 +-- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h index ac12e5beb596..5270c9226b8b 100644 --- a/drivers/net/ethernet/qlogic/qede/qede.h +++ b/drivers/net/ethernet/qlogic/qede/qede.h @@ -581,6 +581,7 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, struct flow_cls_offload *f); void qede_forced_speed_maps_init(void); +int qede_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal); #ifdef CONFIG_NET_POLL_CONTROLLER void qede_poll_controller(struct net_device *dev); diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 522736968496..e094a6ef299c 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -819,8 +819,7 @@ static int qede_get_coalesce(struct net_device *dev, return rc; } -static int qede_set_coalesce(struct net_device *dev, - struct ethtool_coalesce *coal) +int qede_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal) { struct qede_dev *edev = netdev_priv(dev); struct qede_fastpath *fp; diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index 2ff6c49de745..3eb821f55ccb 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -2337,6 +2337,7 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode, bool is_locked) { struct qed_link_params link_params; + struct ethtool_coalesce coal = {}; u8 num_tc; int rc; @@ -2399,6 +2400,9 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode, edev->state = QEDE_STATE_OPEN; + coal.rx_coalesce_usecs = QED_DEFAULT_RX_USECS; + coal.tx_coalesce_usecs = QED_DEFAULT_TX_USECS; + qede_set_coalesce(edev->ndev, &coal); DP_INFO(edev, "Ending successfully qede load\n"); goto out;