-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bnxt_en: add support for software dynamic interrupt moderation
This implements the changes needed for the bnxt_en driver to add support for dynamic interrupt moderation per ring. This does add additional counters in the receive path, but testing shows that any additional instructions are offset by throughput gain when the default configuration is for low latency. Signed-off-by: Andy Gospodarek <gospo@broadcom.com> Acked-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Andy Gospodarek
authored and
David S. Miller
committed
Jan 10, 2018
1 parent
8115b75
commit 6a8788f
Showing
5 changed files
with
118 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
obj-$(CONFIG_BNXT) += bnxt_en.o | ||
|
||
bnxt_en-y := bnxt.o bnxt_sriov.o bnxt_ethtool.o bnxt_dcb.o bnxt_ulp.o bnxt_xdp.o bnxt_vfr.o bnxt_devlink.o | ||
bnxt_en-y := bnxt.o bnxt_sriov.o bnxt_ethtool.o bnxt_dcb.o bnxt_ulp.o bnxt_xdp.o bnxt_vfr.o bnxt_devlink.o bnxt_dim.o | ||
bnxt_en-$(CONFIG_BNXT_FLOWER_OFFLOAD) += bnxt_tc.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* Broadcom NetXtreme-C/E network driver. | ||
* | ||
* Copyright (c) 2017-2018 Broadcom Limited | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/net_dim.h> | ||
#include "bnxt_hsi.h" | ||
#include "bnxt.h" | ||
|
||
void bnxt_dim_work(struct work_struct *work) | ||
{ | ||
struct net_dim *dim = container_of(work, struct net_dim, | ||
work); | ||
struct bnxt_cp_ring_info *cpr = container_of(dim, | ||
struct bnxt_cp_ring_info, | ||
dim); | ||
struct bnxt_napi *bnapi = container_of(cpr, | ||
struct bnxt_napi, | ||
cp_ring); | ||
struct net_dim_cq_moder cur_profile = net_dim_get_profile(dim->mode, | ||
dim->profile_ix); | ||
|
||
cpr->rx_ring_coal.coal_ticks = cur_profile.usec; | ||
cpr->rx_ring_coal.coal_bufs = cur_profile.pkts; | ||
|
||
bnxt_hwrm_set_ring_coal(bnapi->bp, bnapi); | ||
dim->state = NET_DIM_START_MEASURE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters