netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
	"Samudrala, Sridhar" <sridhar.samudrala@intel.com>
Cc: David Miller <davem@davemloft.net>,
	Alexander Duyck <aduyck@mirantis.com>,
	Netdev <netdev@vger.kernel.org>, Neil Horman <nhorman@redhat.com>,
	sassmann@redhat.com, John Greene <jogreene@redhat.com>
Subject: Re: [net-next 08/14] ixgbe: Add support for generic Tx checksums
Date: Mon, 04 Apr 2016 15:56:35 -0700	[thread overview]
Message-ID: <1459810595.4070.20.camel@intel.com> (raw)
In-Reply-To: <CAKgT0Uf1zT2uihC6e04nt_1MkwOBsnx4Yh-ZJ-1i2kEec_zJFQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5427 bytes --]

On Mon, 2016-04-04 at 15:54 -0700, Alexander Duyck wrote:
> On Mon, Apr 4, 2016 at 3:32 PM, Samudrala, Sridhar
> <sridhar.samudrala@intel.com> wrote:
> > On 4/4/2016 3:14 PM, Jeff Kirsher wrote:
> >>
> >> From: Alexander Duyck <aduyck@mirantis.com>
> >>
> >> This patch adds support for generic Tx checksums to the ixgbe
> driver.  It
> >> turns out this is actually pretty easy after going over the
> datasheet as
> >> we
> >> were doing a number of steps we didn't need to.
> >>
> >> In order to perform a Tx checksum for an L4 header we need to fill
> in the
> >> following fields in the Tx descriptor:
> >>    MACLEN (maximum of 127), retrieved from:
> >>                 skb_network_offset()
> >>    IPLEN  (maximum of 511), retrieved from:
> >>                 skb_checksum_start_offset() - skb_network_offset()
> >>    TUCMD.L4T indicates offset and if checksum or crc32c, based on:
> >>                 skb->csum_offset
> >>
> >> The added advantage to doing this is that we can support inner
> checksum
> >> offloads for tunnels and MPLS while still being able to
> transparently
> >> insert VLAN tags.
> >>
> >> I also took the opportunity to clean-up many of the feature flag
> >> configuration bits to make them a bit more consistent between
> drivers.
> >>
> >> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
> >> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> >> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> >> ---
> >>   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 164
> >> +++++++++-----------------
> >>   1 file changed, 59 insertions(+), 105 deletions(-)
> >>
> >> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> >> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> >> index bce5737..8d248c8 100644
> >> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> >> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> >> @@ -7202,103 +7202,61 @@ static int ixgbe_tso(struct ixgbe_ring
> *tx_ring,
> >>         return 1;
> >>   }
> >>
> >
> >
> > <snip>
> >
> >
> >
> >> @@ -9190,41 +9148,37 @@ skip_sriov:
> >>     #endif
> >>         netdev->features = NETIF_F_SG |
> >> -                          NETIF_F_IP_CSUM |
> >> -                          NETIF_F_IPV6_CSUM |
> >> -                          NETIF_F_HW_VLAN_CTAG_TX |
> >> -                          NETIF_F_HW_VLAN_CTAG_RX |
> >>                            NETIF_F_TSO |
> >>                            NETIF_F_TSO6 |
> >>                            NETIF_F_RXHASH |
> >> -                          NETIF_F_RXCSUM;
> >> -
> >> -       netdev->hw_features = netdev->features |
> NETIF_F_HW_L2FW_DOFFLOAD;
> >> +                          NETIF_F_RXCSUM |
> >> +                          NETIF_F_HW_CSUM |
> >> +                          NETIF_F_SCTP_CRC |
> >> +                          NETIF_F_HW_VLAN_CTAG_TX |
> >> +                          NETIF_F_HW_VLAN_CTAG_RX;
> >>   -     switch (adapter->hw.mac.type) {
> >> -       case ixgbe_mac_82599EB:
> >> -       case ixgbe_mac_X540:
> >> -       case ixgbe_mac_X550:
> >> -       case ixgbe_mac_X550EM_x:
> >> +       if (hw->mac.type >= ixgbe_mac_82599EB)
> >>                 netdev->features |= NETIF_F_SCTP_CRC;
> >> -               netdev->hw_features |= NETIF_F_SCTP_CRC |
> >> -                                      NETIF_F_NTUPLE |
> >> -                                      NETIF_F_HW_TC;
> >> -               break;
> >> -       default:
> >> -               break;
> >> -       }
> >>   -     netdev->hw_features |= NETIF_F_RXALL;
> >> +       /* copy netdev features into list of user selectable
> features */
> >> +       netdev->hw_features |= netdev->features;
> >> +       netdev->hw_features |= NETIF_F_RXALL |
> >> +                              NETIF_F_HW_L2FW_DOFFLOAD;
> >> +
> >> +       if (hw->mac.type >= ixgbe_mac_82599EB)
> >> +               netdev->hw_features |= NETIF_F_NTUPLE;
> >
> >
> > looks like the cleanup missed moving NETIF_F_HW_TC flag here that
> enables
> > cls_u32 offloads via TC.
> 
> Back when I submitted this patch the NETIF_F_HW_TC flag didn't exist.
> I'm pretty sure this is probably a case of a patch getting mangled
> after sitting in the tree for so long.
> 
> In addition I just noticed there is a bug in the setting of the
> SCTP_CRC flag as well.  It is set twice when we should only be
> setting
> it in the if statement.  It is just a quick 2 line fix that is
> needed.
> I can either submit a follow-up or I can respin the original patch
> real quick so that it applies on top of the current ixgbe queue.

It was because Sridhar needed his patch applied before yours as a fix,
that was the issue.  Just send me the two line fix you have for the
patch and I will re-spin the patch with Sridhar's needed fix as well.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-04-04 22:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 22:14 [net-next 00/14][pull request] 10GbE Intel Wired LAN Driver Updates 2016-04-04 Jeff Kirsher
2016-04-04 22:14 ` [net-next 01/14] ixgbe: on recv increment rx.ring->stats.yields Jeff Kirsher
2016-04-04 22:14 ` [net-next 02/14] ixgbevf: use bit operations for setting and checking resets Jeff Kirsher
2016-04-04 22:14 ` [net-next 03/14] ixgbe: Extend trust to allow guest to set unicast address Jeff Kirsher
2016-04-04 22:14 ` [net-next 04/14] ixgbe: Do not allow PF to add VLVF entry unless it actually needs it Jeff Kirsher
2016-04-04 22:14 ` [net-next 05/14] ixgbe: Avoid adding VLAN 0 twice to VLVF and VFTA Jeff Kirsher
2016-04-04 22:14 ` [net-next 06/14] ixgbe: Make all unchanging ops structures const Jeff Kirsher
2016-04-04 22:14 ` [net-next 07/14] ixgbe: use eth_platform_get_mac_address() Jeff Kirsher
2016-04-04 22:14 ` [net-next 08/14] ixgbe: Add support for generic Tx checksums Jeff Kirsher
2016-04-04 22:32   ` Samudrala, Sridhar
2016-04-04 22:54     ` Alexander Duyck
2016-04-04 22:56       ` Jeff Kirsher [this message]
2016-04-05  1:27     ` David Miller
2016-04-05  1:29       ` Jeff Kirsher
2016-04-04 22:14 ` [net-next 09/14] ixgbevf: " Jeff Kirsher
2016-04-04 22:14 ` [net-next 10/14] ixgbe: Fix flow control for Xeon D KR backplane Jeff Kirsher
2016-04-04 22:14 ` [net-next 11/14] ixgbe: add a callback to set the maximum transmit bitrate Jeff Kirsher
2016-04-04 22:14 ` [net-next 12/14] ixgbe: Place SWFW semaphore in known valid state at probe Jeff Kirsher
2016-04-04 22:14 ` [net-next 13/14] ixgbe: Extend cls_u32 offload to support UDP headers Jeff Kirsher
2016-04-04 22:14 ` [net-next 14/14] ixgbe: Add support for toggling VLAN filtering flag via ethtool 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=1459810595.4070.20.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=aduyck@mirantis.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=sridhar.samudrala@intel.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 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).