From: Keller, Jacob E <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net] ixgbe: napi_poll must return the work done
Date: Thu, 16 Jun 2016 17:10:06 +0000 [thread overview]
Message-ID: <1466097006.17117.7.camel@intel.com> (raw)
In-Reply-To: <CAHdzE-8V8o9sg9xmiJ9J0G3u=k6K-fHQssb5v09TPJvN2N=a1Q@mail.gmail.com>
On Wed, 2016-06-15 at 09:34 -0700, Venkatesh Srinivas wrote:
> On Wed, Jun 15, 2016 at 6:37 AM, Paolo Abeni <pabeni@redhat.com>
> wrote:
> >
> > Currently the function ixgbe_poll() returns 0 when it clean
> > completely
> > the rx rings, but this foul budget accounting in core code.
> > Fix this returning the actual work done, capped to weight - 1,
> > since
> > the core doesn't allow to return the full budget when the driver
> > modifies
> > the napi status
> >
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> > ?drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
> > ?1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > index 088c47c..8bebd86 100644
> > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > @@ -2887,7 +2887,7 @@ int ixgbe_poll(struct napi_struct *napi, int
> > budget)
> > ????????if (!test_bit(__IXGBE_DOWN, &adapter->state))
> > ????????????????ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector-
> > >v_idx));
> >
> > -???????return 0;
> > +???????return min(work_done, budget - 1);
> > ?}
> >
> > ?/**
> Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
>
> The same bit of code appears in fm10k and i40e/i40evf. ixgb appears
> to
> correctly return work_done.
>
> ixgbe_poll also appears to return an (minor) incorrect work_done in
> another case, BTW. It divides its
> budget between Rx rings associated with a vector. If any ring exceeds
> its share of the budget, ixgbe_poll
> claims to have consumed the full budget, even if a full budget of
> frames was not received in a single
> pass.
>
> -- vs;
I can submit a patch for fm10k.
Thanks,
Jake
WARNING: multiple messages have this Message-ID (diff)
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: "venkateshs@google.com" <venkateshs@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>
Cc: "hannes@redhat.com" <hannes@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH net] ixgbe: napi_poll must return the work done
Date: Thu, 16 Jun 2016 17:10:06 +0000 [thread overview]
Message-ID: <1466097006.17117.7.camel@intel.com> (raw)
In-Reply-To: <CAHdzE-8V8o9sg9xmiJ9J0G3u=k6K-fHQssb5v09TPJvN2N=a1Q@mail.gmail.com>
On Wed, 2016-06-15 at 09:34 -0700, Venkatesh Srinivas wrote:
> On Wed, Jun 15, 2016 at 6:37 AM, Paolo Abeni <pabeni@redhat.com>
> wrote:
> >
> > Currently the function ixgbe_poll() returns 0 when it clean
> > completely
> > the rx rings, but this foul budget accounting in core code.
> > Fix this returning the actual work done, capped to weight - 1,
> > since
> > the core doesn't allow to return the full budget when the driver
> > modifies
> > the napi status
> >
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > index 088c47c..8bebd86 100644
> > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > @@ -2887,7 +2887,7 @@ int ixgbe_poll(struct napi_struct *napi, int
> > budget)
> > if (!test_bit(__IXGBE_DOWN, &adapter->state))
> > ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector-
> > >v_idx));
> >
> > - return 0;
> > + return min(work_done, budget - 1);
> > }
> >
> > /**
> Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
>
> The same bit of code appears in fm10k and i40e/i40evf. ixgb appears
> to
> correctly return work_done.
>
> ixgbe_poll also appears to return an (minor) incorrect work_done in
> another case, BTW. It divides its
> budget between Rx rings associated with a vector. If any ring exceeds
> its share of the budget, ixgbe_poll
> claims to have consumed the full budget, even if a full budget of
> frames was not received in a single
> pass.
>
> -- vs;
I can submit a patch for fm10k.
Thanks,
Jake
next prev parent reply other threads:[~2016-06-16 17:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 13:37 [Intel-wired-lan] [PATCH net] ixgbe: napi_poll must return the work done Paolo Abeni
2016-06-15 13:37 ` Paolo Abeni
2016-06-15 15:20 ` [Intel-wired-lan] " Alexander Duyck
2016-06-15 15:20 ` Alexander Duyck
2016-06-15 15:43 ` [Intel-wired-lan] " Paolo Abeni
2016-06-15 15:43 ` Paolo Abeni
2016-06-15 16:34 ` [Intel-wired-lan] " Venkatesh Srinivas
2016-06-15 16:34 ` Venkatesh Srinivas
2016-06-16 17:10 ` Keller, Jacob E [this message]
2016-06-16 17:10 ` Keller, Jacob E
2016-06-16 17:40 ` [Intel-wired-lan] " Keller, Jacob E
2016-06-16 17:40 ` Keller, Jacob E
2016-06-16 17:43 ` [Intel-wired-lan] " Keller, Jacob E
2016-06-16 17:43 ` Keller, Jacob E
2016-07-13 15:12 ` [Intel-wired-lan] " Bowers, AndrewX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466097006.17117.7.camel@intel.com \
--to=jacob.e.keller@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.