All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keller, Jacob E <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] fm10k: Don't assume page fragments are page size
Date: Tue, 16 Jun 2015 21:38:55 +0000	[thread overview]
Message-ID: <1434490735.12272.5.camel@intel.com> (raw)
In-Reply-To: <20150616184712.1966.44790.stgit@ahduyck-vm-fedora22>

Acked-by: Jacob Keller <jacob.e.keller@intel.com>

Regards,
Jake

On Tue, 2015-06-16 at 11:47 -0700, Alexander Duyck wrote:
> This change pulls out the optimization that assumed that all 
> fragments
> would be limited to page size.  That hasn't been the case for some 
> time now
> and to assume this is incorrect as the TCP allocator can provide up 
> to a
> 32K page fragment.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> ---
>  drivers/net/ethernet/intel/fm10k/fm10k_main.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c 
> b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> index 982fdcdc795b..620ff5e9dc59 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> @@ -1079,9 +1079,7 @@ netdev_tx_t fm10k_xmit_frame_ring(struct 
> sk_buff *skb,
>       struct fm10k_tx_buffer *first;
>       int tso;
>       u32 tx_flags = 0;
> -#if PAGE_SIZE > FM10K_MAX_DATA_PER_TXD
>       unsigned short f;
> -#endif
>       u16 count = TXD_USE_COUNT(skb_headlen(skb));
>  
>       /* need: 1 descriptor per page * 
> PAGE_SIZE/FM10K_MAX_DATA_PER_TXD,
> @@ -1089,12 +1087,9 @@ netdev_tx_t fm10k_xmit_frame_ring(struct 
> sk_buff *skb,
>        *       + 2 desc gap to keep tail from touching head
>        * otherwise try next time
>        */
> -#if PAGE_SIZE > FM10K_MAX_DATA_PER_TXD
>       for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
>               count += TXD_USE_COUNT(skb_shinfo(skb)
> ->frags[f].size);
> -#else
> -     count += skb_shinfo(skb)->nr_frags;
> -#endif
> +
>       if (fm10k_maybe_stop_tx(tx_ring, count + 3)) {
>               tx_ring->tx_stats.tx_busy++;
>               return NETDEV_TX_BUSY;
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at lists.osuosl.org
> http://lists.osuosl.org/mailman/listinfo/intel-wired-lan

WARNING: multiple messages have this Message-ID (diff)
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: "alexander.h.duyck@redhat.com" <alexander.h.duyck@redhat.com>
Cc: "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>
Subject: Re: [Intel-wired-lan] [PATCH] fm10k: Don't assume page fragments are page size
Date: Tue, 16 Jun 2015 21:38:55 +0000	[thread overview]
Message-ID: <1434490735.12272.5.camel@intel.com> (raw)
In-Reply-To: <20150616184712.1966.44790.stgit@ahduyck-vm-fedora22>

Acked-by: Jacob Keller <jacob.e.keller@intel.com>

Regards,
Jake

On Tue, 2015-06-16 at 11:47 -0700, Alexander Duyck wrote:
> This change pulls out the optimization that assumed that all 
> fragments
> would be limited to page size.  That hasn't been the case for some 
> time now
> and to assume this is incorrect as the TCP allocator can provide up 
> to a
> 32K page fragment.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
> ---
>  drivers/net/ethernet/intel/fm10k/fm10k_main.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c 
> b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> index 982fdcdc795b..620ff5e9dc59 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> @@ -1079,9 +1079,7 @@ netdev_tx_t fm10k_xmit_frame_ring(struct 
> sk_buff *skb,
>       struct fm10k_tx_buffer *first;
>       int tso;
>       u32 tx_flags = 0;
> -#if PAGE_SIZE > FM10K_MAX_DATA_PER_TXD
>       unsigned short f;
> -#endif
>       u16 count = TXD_USE_COUNT(skb_headlen(skb));
>  
>       /* need: 1 descriptor per page * 
> PAGE_SIZE/FM10K_MAX_DATA_PER_TXD,
> @@ -1089,12 +1087,9 @@ netdev_tx_t fm10k_xmit_frame_ring(struct 
> sk_buff *skb,
>        *       + 2 desc gap to keep tail from touching head
>        * otherwise try next time
>        */
> -#if PAGE_SIZE > FM10K_MAX_DATA_PER_TXD
>       for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
>               count += TXD_USE_COUNT(skb_shinfo(skb)
> ->frags[f].size);
> -#else
> -     count += skb_shinfo(skb)->nr_frags;
> -#endif
> +
>       if (fm10k_maybe_stop_tx(tx_ring, count + 3)) {
>               tx_ring->tx_stats.tx_busy++;
>               return NETDEV_TX_BUSY;
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@lists.osuosl.org
> http://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2015-06-16 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 18:47 [Intel-wired-lan] [PATCH] fm10k: Don't assume page fragments are page size Alexander Duyck
2015-06-16 18:47 ` Alexander Duyck
2015-06-16 21:38 ` Keller, Jacob E [this message]
2015-06-16 21:38   ` [Intel-wired-lan] " Keller, Jacob E
2015-09-02  2:00 ` Singh, Krishneil K
2015-09-02  2:00   ` Singh, Krishneil K

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=1434490735.12272.5.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.