All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, davem@davemloft.net
Cc: Mark Rustad <mark.d.rustad@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com
Subject: Re: [net-next 13/15] ixgbe: Handle extended IPv6 headers in tx path
Date: Wed, 2 Dec 2015 08:21:02 -0800	[thread overview]
Message-ID: <565F1A6E.5010305@gmail.com> (raw)
In-Reply-To: <1449059468-87025-14-git-send-email-jeffrey.t.kirsher@intel.com>

On 12/02/2015 04:31 AM, Jeff Kirsher wrote:
> From: Mark Rustad <mark.d.rustad@intel.com>
>
> Check for and handle IPv6 extended headers so that Tx checksum
> offload can be done. Thanks to Tom Herbert for noticing this
> problem. Note that the goto back to process the final protocol
> value can never result in a loop, because it cannot be yet
> another extended header. Handling them in this manner avoids
> adding further checks to the non-extended header hot path.
>
> Reported-by: Tom Herbert <tom@herbertland.com>
> Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 19 ++++++++++++++++++-
>   1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index a10a0fa..b7f1133 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -7095,6 +7095,7 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
>   			}
>   		}
>
> +again:
>   		switch (l4_hdr) {
>   		case IPPROTO_TCP:
>   			type_tucmd |= IXGBE_ADVTXD_TUCMD_L4T_TCP;
> @@ -7111,7 +7112,23 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
>   					IXGBE_ADVTXD_L4LEN_SHIFT;
>   			break;
>   		default:
> -			if (unlikely(net_ratelimit())) {
> +			if (network_hdr.ipv4->version == 6 &&
> +			    ipv6_ext_hdr(l4_hdr)) {
> +				unsigned int offset = 0;
> +				int ret;
> +
> +				ret = ipv6_find_hdr(skb, &offset, -1, NULL,
> +						    NULL);
> +				if (ret > 0) {
> +					l4_hdr = ret;
> +					goto again;
> +				}
> +				if (unlikely(net_ratelimit())) {
> +					dev_warn(tx_ring->dev,
> +						 "ipv6_find_hdr returned %d\n",
> +						 ret);
> +				}
> +			} else if (unlikely(net_ratelimit())) {
>   				dev_warn(tx_ring->dev,
>   				 "partial checksum but l4 proto=%x!\n",
>   				 l4_hdr);
>

This doesn't look right.  How come this doesn't match the implementation 
you did for the ixgbevf driver?  If I am not mistaken this approach had 
issues where it could spin forever didn't it?

- Alex

  reply	other threads:[~2015-12-02 16:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 12:30 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-12-02 Jeff Kirsher
2015-12-02 12:30 ` [net-next 01/15] ixgbe: Prevent KR PHY reset in ixgbe_init_phy_ops_x550em Jeff Kirsher
2015-12-02 12:30 ` [net-next 02/15] ixgbe: Add support for newer thermal alarm Jeff Kirsher
2015-12-02 12:30 ` [net-next 03/15] ixgbe: Use private workqueue to avoid certain possible hangs Jeff Kirsher
2015-12-02 12:30 ` [net-next 04/15] ixgbevf: Use a " Jeff Kirsher
2015-12-02 12:30 ` [net-next 05/15] ixgbevf: Minor cleanups Jeff Kirsher
2015-12-02 12:30 ` [net-next 06/15] ixgbe: Refactor MAC address configuration code Jeff Kirsher
2015-12-02 12:31 ` [net-next 07/15] ixgbe: Use __dev_uc_sync and __dev_uc_unsync for unicast addresses Jeff Kirsher
2015-12-02 12:31 ` [net-next 08/15] ixgbe: Allow FDB entries access to more RAR filters Jeff Kirsher
2015-12-02 12:31 ` [net-next 09/15] ixgbe: Update PTP to support X550EM_x devices Jeff Kirsher
2015-12-02 12:31 ` [net-next 10/15] ixgbe: Correct spec violations by waiting after reset Jeff Kirsher
2015-12-02 12:31 ` [net-next 11/15] ixgbe: Wait for master disable to be set Jeff Kirsher
2015-12-02 12:31 ` [net-next 12/15] ixgbe: Save VF info and take references Jeff Kirsher
2015-12-02 12:31 ` [net-next 13/15] ixgbe: Handle extended IPv6 headers in tx path Jeff Kirsher
2015-12-02 16:21   ` Alexander Duyck [this message]
2015-12-03  1:06     ` Rustad, Mark D
2015-12-02 12:31 ` [net-next 14/15] ixgbe: Always turn PHY power on when requested Jeff Kirsher
2015-12-02 12:31 ` [net-next 15/15] ixgbevf: Handle extended IPv6 headers in Tx path Jeff Kirsher
2015-12-02 21:45 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-12-02 David Miller
2015-12-03  1:59   ` Jeff Kirsher

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=565F1A6E.5010305@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jogreene@redhat.com \
    --cc=mark.d.rustad@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /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.