From: "Samudrala, Sridhar" <sridhar.samudrala@intel.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, davem@davemloft.net
Cc: Alexander Duyck <aduyck@mirantis.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com
Subject: Re: [net-next 08/14] ixgbe: Add support for generic Tx checksums
Date: Mon, 04 Apr 2016 15:32:37 -0700 [thread overview]
Message-ID: <5702EB85.5080307@intel.com> (raw)
In-Reply-To: <1459808097-26409-9-git-send-email-jeffrey.t.kirsher@intel.com>
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.
> +
> + /* set this bit last since it cannot be part of hw_features */
> netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>
> - netdev->vlan_features |= NETIF_F_TSO;
> - netdev->vlan_features |= NETIF_F_TSO6;
> - netdev->vlan_features |= NETIF_F_IP_CSUM;
> - netdev->vlan_features |= NETIF_F_IPV6_CSUM;
> - netdev->vlan_features |= NETIF_F_SG;
> + netdev->vlan_features |= NETIF_F_SG |
> + NETIF_F_TSO |
> + NETIF_F_TSO6 |
> + NETIF_F_HW_CSUM |
> + NETIF_F_SCTP_CRC;
>
> - netdev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
> + netdev->mpls_features |= NETIF_F_HW_CSUM;
> + netdev->hw_enc_features |= NETIF_F_HW_CSUM;
>
> netdev->priv_flags |= IFF_UNICAST_FLT;
> netdev->priv_flags |= IFF_SUPP_NOFCS;
next prev parent reply other threads:[~2016-04-04 22:32 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 [this message]
2016-04-04 22:54 ` Alexander Duyck
2016-04-04 22:56 ` Jeff Kirsher
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=5702EB85.5080307@intel.com \
--to=sridhar.samudrala@intel.com \
--cc=aduyck@mirantis.com \
--cc=davem@davemloft.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jogreene@redhat.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.