From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
Andrew Bowers <andrewx.bowers@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 05/16] ice: move code closer together
Date: Thu, 5 Sep 2019 13:33:55 -0700 [thread overview]
Message-ID: <20190905203406.4152-6-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20190905203406.4152-1-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
This is a simple patch to move the assignment to a local variable
closer to the site where the local variable is used. This
can help readability and also maybe performance, although the
performance enhancement is really dependent upon the compiler.
No functional change.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ice/ice_txrx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 4fe1b332e67e..ec581b1f0fcb 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -1068,9 +1068,6 @@ static int ice_clean_rx_irq(struct ice_ring *rx_ring, int budget)
continue;
}
- rx_ptype = le16_to_cpu(rx_desc->wb.ptype_flex_flags0) &
- ICE_RX_FLEX_DESC_PTYPE_M;
-
stat_err_bits = BIT(ICE_RX_FLEX_DESC_STATUS0_L2TAG1P_S);
if (ice_test_staterr(rx_desc, stat_err_bits))
vlan_tag = le16_to_cpu(rx_desc->wb.l2tag1);
@@ -1087,6 +1084,9 @@ static int ice_clean_rx_irq(struct ice_ring *rx_ring, int budget)
total_rx_bytes += skb->len;
/* populate checksum, VLAN, and protocol */
+ rx_ptype = le16_to_cpu(rx_desc->wb.ptype_flex_flags0) &
+ ICE_RX_FLEX_DESC_PTYPE_M;
+
ice_process_skb_fields(rx_ring, rx_desc, skb, rx_ptype);
/* send completed skb up the stack */
--
2.21.0
next prev parent reply other threads:[~2019-09-05 20:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 20:33 [net-next 00/16][pull request] 100GbE Intel Wired LAN Driver Updates 2019-09-05 Jeff Kirsher
2019-09-05 20:33 ` [net-next 01/16] ice: Update fields in ice_vsi_set_num_qs when reconfiguring Jeff Kirsher
2019-09-05 20:33 ` [net-next 02/16] ice: Add ice_get_main_vsi to get PF/main VSI Jeff Kirsher
2019-09-05 20:33 ` [net-next 03/16] ice: Check root pointer for validity Jeff Kirsher
2019-09-05 20:33 ` [net-next 04/16] ice: clean up arguments Jeff Kirsher
2019-09-05 20:33 ` Jeff Kirsher [this message]
2019-09-05 20:33 ` [net-next 06/16] ice: small efficiency fixes Jeff Kirsher
2019-09-05 20:33 ` [net-next 07/16] ice: change work limit to a constant Jeff Kirsher
2019-09-05 20:33 ` [net-next 08/16] ice: Reliably reset VFs Jeff Kirsher
2019-09-05 20:33 ` [net-next 09/16] ice: report link down for VF when PF's queues are not enabled Jeff Kirsher
2019-09-05 20:34 ` [net-next 10/16] ice: Check for DCB capability before initializing DCB Jeff Kirsher
2019-09-05 20:34 ` [net-next 11/16] ice: Report VF link status with opcode to get resources Jeff Kirsher
2019-09-05 20:34 ` [net-next 12/16] ice: update Tx context struct Jeff Kirsher
2019-09-05 20:34 ` [net-next 13/16] ice: Allow for delayed LLDP MIB change registration Jeff Kirsher
2019-09-05 20:34 ` [net-next 14/16] ice: Minor refactor in queue management Jeff Kirsher
2019-09-05 20:34 ` [net-next 15/16] ice: change default number of receive descriptors Jeff Kirsher
2019-09-05 20:34 ` [net-next 16/16] ice: Rework around device/function capabilities Jeff Kirsher
2019-09-07 13:27 ` [net-next 00/16][pull request] 100GbE Intel Wired LAN Driver Updates 2019-09-05 David Miller
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=20190905203406.4152-6-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=andrewx.bowers@intel.com \
--cc=davem@davemloft.net \
--cc=jesse.brandeburg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox