All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Nelson <shannon.nelson@oracle.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, steffen.klassert@secunet.com
Subject: [next-queue v2 2/4] ixgbe: remove unneeded ipsec test in TX path
Date: Fri, 16 Mar 2018 11:09:05 -0700	[thread overview]
Message-ID: <1521223747-12018-3-git-send-email-shannon.nelson@oracle.com> (raw)
In-Reply-To: <1521223747-12018-1-git-send-email-shannon.nelson@oracle.com>

Since the ipsec data fields will be zero anyway in the non-ipsec
case, we can remove the conditional jump.

Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 153cd9e..a54f3d8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7864,10 +7864,8 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
 	vlan_macip_lens |= skb_network_offset(skb) << IXGBE_ADVTXD_MACLEN_SHIFT;
 	vlan_macip_lens |= first->tx_flags & IXGBE_TX_FLAGS_VLAN_MASK;
 
-	if (first->tx_flags & IXGBE_TX_FLAGS_IPSEC) {
-		fceof_saidx |= itd->sa_idx;
-		type_tucmd |= itd->flags | itd->trailer_len;
-	}
+	fceof_saidx |= itd->sa_idx;
+	type_tucmd |= itd->flags | itd->trailer_len;
 
 	ixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, fceof_saidx, type_tucmd, 0);
 }
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Shannon Nelson <shannon.nelson@oracle.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next-queue v2 2/4] ixgbe: remove unneeded ipsec test in TX path
Date: Fri, 16 Mar 2018 11:09:05 -0700	[thread overview]
Message-ID: <1521223747-12018-3-git-send-email-shannon.nelson@oracle.com> (raw)
In-Reply-To: <1521223747-12018-1-git-send-email-shannon.nelson@oracle.com>

Since the ipsec data fields will be zero anyway in the non-ipsec
case, we can remove the conditional jump.

Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 153cd9e..a54f3d8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7864,10 +7864,8 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
 	vlan_macip_lens |= skb_network_offset(skb) << IXGBE_ADVTXD_MACLEN_SHIFT;
 	vlan_macip_lens |= first->tx_flags & IXGBE_TX_FLAGS_VLAN_MASK;
 
-	if (first->tx_flags & IXGBE_TX_FLAGS_IPSEC) {
-		fceof_saidx |= itd->sa_idx;
-		type_tucmd |= itd->flags | itd->trailer_len;
-	}
+	fceof_saidx |= itd->sa_idx;
+	type_tucmd |= itd->flags | itd->trailer_len;
 
 	ixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, fceof_saidx, type_tucmd, 0);
 }
-- 
2.7.4


  parent reply	other threads:[~2018-03-16 18:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 18:09 [next-queue v2 0/4] ixgbe: Enable tso and checksum offload with ipsec Shannon Nelson
2018-03-16 18:09 ` [Intel-wired-lan] " Shannon Nelson
2018-03-16 18:09 ` [next-queue v2 1/4] ixgbe: no need for ipsec csum feature check Shannon Nelson
2018-03-16 18:09   ` [Intel-wired-lan] " Shannon Nelson
2018-03-19 22:11   ` Bowers, AndrewX
2018-03-16 18:09 ` Shannon Nelson [this message]
2018-03-16 18:09   ` [Intel-wired-lan] [next-queue v2 2/4] ixgbe: remove unneeded ipsec test in TX path Shannon Nelson
2018-03-19 22:12   ` Bowers, AndrewX
2018-03-16 18:09 ` [next-queue v2 3/4] ixgbe: no need for esp trailer if gso Shannon Nelson
2018-03-16 18:09   ` [Intel-wired-lan] " Shannon Nelson
2018-03-19 22:12   ` Bowers, AndrewX
2018-03-16 18:09 ` [next-queue v2 4/4] ixgbe: enable tso with ipsec offload Shannon Nelson
2018-03-16 18:09   ` [Intel-wired-lan] " Shannon Nelson
2018-03-19 22:13   ` 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=1521223747-12018-3-git-send-email-shannon.nelson@oracle.com \
    --to=shannon.nelson@oracle.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.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.