* [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts
@ 2018-05-17 5:34 Wenzhuo Lu
2018-05-17 13:47 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Wenzhuo Lu @ 2018-05-17 5:34 UTC (permalink / raw)
To: dev; +Cc: Wenzhuo Lu, Michael Luo
To support kernel VF, PBA bit is always set. But it may
cause the too many interrupts issue on specific Linux
kernel, like 4.4.0-116.
PF host should set the atuo clean, mask and throttling
as we always set the register for kernel VF.
Fixes: 6b75183ac4d0 ("net/ixgbe: fix wrong PBA setting")
Signed-off-by: Michael Luo <michael.luo@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 49 +++++++++++++++++++++++-----------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f5006bc..7219f02 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5800,8 +5800,12 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
/* won't configure msix register if no mapping is done
* between intr vector and event fd
+ * but if misx has been enabled already, need to configure
+ * auto clean, auto mask and throttling.
*/
- if (!rte_intr_dp_is_en(intr_handle))
+ gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
+ if (!rte_intr_dp_is_en(intr_handle) &&
+ !(gpie & (IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT)))
return;
if (rte_intr_allow_others(intr_handle))
@@ -5825,27 +5829,30 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
/* Populate the IVAR table and set the ITR values to the
* corresponding register.
*/
- for (queue_id = 0; queue_id < dev->data->nb_rx_queues;
- queue_id++) {
- /* by default, 1:1 mapping */
- ixgbe_set_ivar_map(hw, 0, queue_id, vec);
- intr_handle->intr_vec[queue_id] = vec;
- if (vec < base + intr_handle->nb_efd - 1)
- vec++;
- }
+ if (rte_intr_dp_is_en(intr_handle)) {
+ for (queue_id = 0; queue_id < dev->data->nb_rx_queues;
+ queue_id++) {
+ /* by default, 1:1 mapping */
+ ixgbe_set_ivar_map(hw, 0, queue_id, vec);
+ intr_handle->intr_vec[queue_id] = vec;
+ if (vec < base + intr_handle->nb_efd - 1)
+ vec++;
+ }
- switch (hw->mac.type) {
- case ixgbe_mac_82598EB:
- ixgbe_set_ivar_map(hw, -1, IXGBE_IVAR_OTHER_CAUSES_INDEX,
- IXGBE_MISC_VEC_ID);
- break;
- case ixgbe_mac_82599EB:
- case ixgbe_mac_X540:
- case ixgbe_mac_X550:
- ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
- break;
- default:
- break;
+ switch (hw->mac.type) {
+ case ixgbe_mac_82598EB:
+ ixgbe_set_ivar_map(hw, -1,
+ IXGBE_IVAR_OTHER_CAUSES_INDEX,
+ IXGBE_MISC_VEC_ID);
+ break;
+ case ixgbe_mac_82599EB:
+ case ixgbe_mac_X540:
+ case ixgbe_mac_X550:
+ ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
+ break;
+ default:
+ break;
+ }
}
IXGBE_WRITE_REG(hw, IXGBE_EITR(IXGBE_MISC_VEC_ID),
IXGBE_EITR_INTERVAL_US(IXGBE_QUEUE_ITR_INTERVAL_DEFAULT)
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts
2018-05-17 5:34 [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts Wenzhuo Lu
@ 2018-05-17 13:47 ` Zhang, Qi Z
2018-05-17 14:52 ` Zhang, Helin
0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Qi Z @ 2018-05-17 13:47 UTC (permalink / raw)
To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo, Luo, Michael
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Thursday, May 17, 2018 1:34 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luo, Michael
> <michael.luo@intel.com>
> Subject: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts
>
> To support kernel VF, PBA bit is always set. But it may cause the too many
> interrupts issue on specific Linux kernel, like 4.4.0-116.
> PF host should set the atuo clean, mask and throttling as we always set the
> register for kernel VF.
>
> Fixes: 6b75183ac4d0 ("net/ixgbe: fix wrong PBA setting")
>
> Signed-off-by: Michael Luo <michael.luo@intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 49
> +++++++++++++++++++++++-----------------
> 1 file changed, 28 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index f5006bc..7219f02 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -5800,8 +5800,12 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev
> *dev, bool on)
>
> /* won't configure msix register if no mapping is done
> * between intr vector and event fd
> + * but if misx has been enabled already, need to configure
> + * auto clean, auto mask and throttling.
> */
> - if (!rte_intr_dp_is_en(intr_handle))
> + gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
> + if (!rte_intr_dp_is_en(intr_handle) &&
> + !(gpie & (IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT)))
> return;
>
> if (rte_intr_allow_others(intr_handle))
> @@ -5825,27 +5829,30 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev
> *dev, bool on)
> /* Populate the IVAR table and set the ITR values to the
> * corresponding register.
> */
> - for (queue_id = 0; queue_id < dev->data->nb_rx_queues;
> - queue_id++) {
> - /* by default, 1:1 mapping */
> - ixgbe_set_ivar_map(hw, 0, queue_id, vec);
> - intr_handle->intr_vec[queue_id] = vec;
> - if (vec < base + intr_handle->nb_efd - 1)
> - vec++;
> - }
> + if (rte_intr_dp_is_en(intr_handle)) {
> + for (queue_id = 0; queue_id < dev->data->nb_rx_queues;
> + queue_id++) {
> + /* by default, 1:1 mapping */
> + ixgbe_set_ivar_map(hw, 0, queue_id, vec);
> + intr_handle->intr_vec[queue_id] = vec;
> + if (vec < base + intr_handle->nb_efd - 1)
> + vec++;
> + }
>
> - switch (hw->mac.type) {
> - case ixgbe_mac_82598EB:
> - ixgbe_set_ivar_map(hw, -1, IXGBE_IVAR_OTHER_CAUSES_INDEX,
> - IXGBE_MISC_VEC_ID);
> - break;
> - case ixgbe_mac_82599EB:
> - case ixgbe_mac_X540:
> - case ixgbe_mac_X550:
> - ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
> - break;
> - default:
> - break;
> + switch (hw->mac.type) {
> + case ixgbe_mac_82598EB:
> + ixgbe_set_ivar_map(hw, -1,
> + IXGBE_IVAR_OTHER_CAUSES_INDEX,
> + IXGBE_MISC_VEC_ID);
> + break;
> + case ixgbe_mac_82599EB:
> + case ixgbe_mac_X540:
> + case ixgbe_mac_X550:
> + ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
> + break;
> + default:
> + break;
> + }
> }
> IXGBE_WRITE_REG(hw, IXGBE_EITR(IXGBE_MISC_VEC_ID),
>
> IXGBE_EITR_INTERVAL_US(IXGBE_QUEUE_ITR_INTERVAL_DEFAULT)
> --
> 1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts
2018-05-17 13:47 ` Zhang, Qi Z
@ 2018-05-17 14:52 ` Zhang, Helin
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Helin @ 2018-05-17 14:52 UTC (permalink / raw)
To: Zhang, Qi Z, Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo, Luo, Michael
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> Sent: Thursday, May 17, 2018 9:47 PM
> To: Lu, Wenzhuo; dev@dpdk.org
> Cc: Lu, Wenzhuo; Luo, Michael
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> > Sent: Thursday, May 17, 2018 1:34 PM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luo, Michael
> > <michael.luo@intel.com>
> > Subject: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts
> >
> > To support kernel VF, PBA bit is always set. But it may cause the too
> > many interrupts issue on specific Linux kernel, like 4.4.0-116.
> > PF host should set the atuo clean, mask and throttling as we always
> > set the register for kernel VF.
> >
> > Fixes: 6b75183ac4d0 ("net/ixgbe: fix wrong PBA setting")
> >
> > Signed-off-by: Michael Luo <michael.luo@intel.com>
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
>
> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel, thanks!
/Helin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-17 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 5:34 [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts Wenzhuo Lu
2018-05-17 13:47 ` Zhang, Qi Z
2018-05-17 14:52 ` Zhang, Helin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).