diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2014-02-13 21:14:41 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-03-19 20:17:21 -0400 |
commit | ff40dd5d44707e2964c1b24196a86bf1938ce32b (patch) | |
tree | efb0ca36f7670eb4109a988d8954ec97a76f46cf | |
parent | 1943d8ba9507d49fa5cdb51eb1b63810d94e1969 (diff) |
i40e/i40evf: reduce context descriptors
We don't need context descriptors for every packet, only tso
or timesync. This fixes a bug in the driver where it would
always add a context even if all the passed in values
to the context descriptor function were 0/default values.
Change-ID: I0101d2b893380707b5c2de61aab3e16d4310e9a1
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 079c6b2bafc3..851f6537a96a 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c | |||
@@ -1951,7 +1951,8 @@ static void i40e_create_tx_ctx(struct i40e_ring *tx_ring, | |||
1951 | struct i40e_tx_context_desc *context_desc; | 1951 | struct i40e_tx_context_desc *context_desc; |
1952 | int i = tx_ring->next_to_use; | 1952 | int i = tx_ring->next_to_use; |
1953 | 1953 | ||
1954 | if (!cd_type_cmd_tso_mss && !cd_tunneling && !cd_l2tag2) | 1954 | if ((cd_type_cmd_tso_mss == I40E_TX_DESC_DTYPE_CONTEXT) && |
1955 | !cd_tunneling && !cd_l2tag2) | ||
1955 | return; | 1956 | return; |
1956 | 1957 | ||
1957 | /* grab the next descriptor */ | 1958 | /* grab the next descriptor */ |
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c index 626c08a98edb..53be5f44d015 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c | |||
@@ -1286,7 +1286,8 @@ static void i40e_create_tx_ctx(struct i40e_ring *tx_ring, | |||
1286 | struct i40e_tx_context_desc *context_desc; | 1286 | struct i40e_tx_context_desc *context_desc; |
1287 | int i = tx_ring->next_to_use; | 1287 | int i = tx_ring->next_to_use; |
1288 | 1288 | ||
1289 | if (!cd_type_cmd_tso_mss && !cd_tunneling && !cd_l2tag2) | 1289 | if ((cd_type_cmd_tso_mss == I40E_TX_DESC_DTYPE_CONTEXT) && |
1290 | !cd_tunneling && !cd_l2tag2) | ||
1290 | return; | 1291 | return; |
1291 | 1292 | ||
1292 | /* grab the next descriptor */ | 1293 | /* grab the next descriptor */ |