* [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates
@ 2015-08-28 21:55 Catherine Sullivan
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor Catherine Sullivan
` (14 more replies)
0 siblings, 15 replies; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
Catherine fixes check_tx_hang, which was missing an else statement.
Greg adds support for a FW CEE DCB nibble swap.
Jesse cleans up some code, refactors code to remove indent, adds a print
to show vxlan support at init, and fixes ip-ip GRE encapulation.
Mitch adds code to detect resets more reliably, changes i40evf to use
capabilities flags properly, and adds code to pass QOS handle to VF.
Shannon adds handling of the writeback descriptor, adds the GetStatus command
for nvmupdate, adds wait states to NVM state machine, adds exec_aq command to
nvmupdate utility, and adds get AQ result command to nvmupdate utility.
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 19 +-
drivers/net/ethernet/intel/i40e/i40e_common.c | 9 +-
drivers/net/ethernet/intel/i40e/i40e_dcb.c | 13 +-
drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 124 +++++----
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 -
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 162 +++++++-----
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 276 +++++++++++++++++++--
drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_type.h | 10 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 19 +-
drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 6 +-
drivers/net/ethernet/intel/i40evf/i40e_common.c | 8 +-
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 8 +-
drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 +
drivers/net/ethernet/intel/i40evf/i40e_type.h | 10 +-
drivers/net/ethernet/intel/i40evf/i40evf.h | 5 +-
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 48 ++--
22 files changed, 531 insertions(+), 205 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-16 17:47 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate Catherine Sullivan
` (13 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Shannon Nelson <shannon.nelson@intel.com>
If the writeback descriptor buffer was previously created, this gives it
to the AQ command request to be used to save the results.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: I8c8a1af81e6ebed6d0a15ed31697fe1a6c4e3708
---
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 26 ++++++++++++++++++++++----
drivers/net/ethernet/intel/i40e/i40e_type.h | 1 +
drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 +
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index 5475454..13534b3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -418,6 +418,10 @@ static i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
bool last_command)
{
i40e_status ret_code = I40E_ERR_NVM;
+ struct i40e_asq_cmd_details cmd_details;
+
+ memset(&cmd_details, 0, sizeof(cmd_details));
+ cmd_details.wb_desc = &hw->nvm_wb_desc;
/* Here we are checking the SR limit only for the flat memory model.
* We cannot do it for the module-based model, as we did not acquire
@@ -443,7 +447,7 @@ static i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
ret_code = i40e_aq_update_nvm(hw, module_pointer,
2 * offset, /*bytes*/
2 * words, /*bytes*/
- data, last_command, NULL);
+ data, last_command, &cmd_details);
return ret_code;
}
@@ -1043,6 +1047,7 @@ static i40e_status i40e_nvmupd_nvm_read(struct i40e_hw *hw,
struct i40e_nvm_access *cmd,
u8 *bytes, int *perrno)
{
+ struct i40e_asq_cmd_details cmd_details;
i40e_status status;
u8 module, transaction;
bool last;
@@ -1051,8 +1056,11 @@ static i40e_status i40e_nvmupd_nvm_read(struct i40e_hw *hw,
module = i40e_nvmupd_get_module(cmd->config);
last = (transaction == I40E_NVM_LCB) || (transaction == I40E_NVM_SA);
+ memset(&cmd_details, 0, sizeof(cmd_details));
+ cmd_details.wb_desc = &hw->nvm_wb_desc;
+
status = i40e_aq_read_nvm(hw, module, cmd->offset, (u16)cmd->data_size,
- bytes, last, NULL);
+ bytes, last, &cmd_details);
if (status) {
i40e_debug(hw, I40E_DEBUG_NVM,
"i40e_nvmupd_nvm_read mod 0x%x off 0x%x len 0x%x\n",
@@ -1079,14 +1087,19 @@ static i40e_status i40e_nvmupd_nvm_erase(struct i40e_hw *hw,
int *perrno)
{
i40e_status status = 0;
+ struct i40e_asq_cmd_details cmd_details;
u8 module, transaction;
bool last;
transaction = i40e_nvmupd_get_transaction(cmd->config);
module = i40e_nvmupd_get_module(cmd->config);
last = (transaction & I40E_NVM_LCB);
+
+ memset(&cmd_details, 0, sizeof(cmd_details));
+ cmd_details.wb_desc = &hw->nvm_wb_desc;
+
status = i40e_aq_erase_nvm(hw, module, cmd->offset, (u16)cmd->data_size,
- last, NULL);
+ last, &cmd_details);
if (status) {
i40e_debug(hw, I40E_DEBUG_NVM,
"i40e_nvmupd_nvm_erase mod 0x%x off 0x%x len 0x%x\n",
@@ -1114,6 +1127,7 @@ static i40e_status i40e_nvmupd_nvm_write(struct i40e_hw *hw,
u8 *bytes, int *perrno)
{
i40e_status status = 0;
+ struct i40e_asq_cmd_details cmd_details;
u8 module, transaction;
bool last;
@@ -1121,8 +1135,12 @@ static i40e_status i40e_nvmupd_nvm_write(struct i40e_hw *hw,
module = i40e_nvmupd_get_module(cmd->config);
last = (transaction & I40E_NVM_LCB);
+ memset(&cmd_details, 0, sizeof(cmd_details));
+ cmd_details.wb_desc = &hw->nvm_wb_desc;
+
status = i40e_aq_update_nvm(hw, module, cmd->offset,
- (u16)cmd->data_size, bytes, last, NULL);
+ (u16)cmd->data_size, bytes, last,
+ &cmd_details);
if (status) {
i40e_debug(hw, I40E_DEBUG_NVM,
"i40e_nvmupd_nvm_write mod 0x%x off 0x%x len 0x%x\n",
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 4d88224..d3558e1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -494,6 +494,7 @@ struct i40e_hw {
/* state of nvm update process */
enum i40e_nvmupd_state nvmupd_state;
+ struct i40e_aq_desc nvm_wb_desc;
/* HMC info */
struct i40e_hmc_info hmc; /* HMC info struct */
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index b7ef8aa..c811081 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -488,6 +488,7 @@ struct i40e_hw {
/* state of nvm update process */
enum i40e_nvmupd_state nvmupd_state;
+ struct i40e_aq_desc nvm_wb_desc;
/* HMC info */
struct i40e_hmc_info hmc; /* HMC info struct */
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 21:30 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine Catherine Sullivan
` (12 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Shannon Nelson <shannon.nelson@intel.com>
This adds a new GetStatus command so that the NVM update tool can query
the current status instead of doing fake write requests to probe for
readiness.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: I671ec6ccd4dfc9dbac3a03b964589d693fda5cd8
---
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 42 ++++++++++++++++++++-------
drivers/net/ethernet/intel/i40e/i40e_type.h | 2 ++
drivers/net/ethernet/intel/i40evf/i40e_type.h | 2 ++
3 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index 13534b3..034e27a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -640,6 +640,7 @@ static char *i40e_nvm_update_state_str[] = {
"I40E_NVMUPD_CSUM_CON",
"I40E_NVMUPD_CSUM_SA",
"I40E_NVMUPD_CSUM_LCB",
+ "I40E_NVMUPD_STATUS",
};
/**
@@ -656,10 +657,34 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw,
u8 *bytes, int *perrno)
{
i40e_status status;
+ enum i40e_nvmupd_cmd upd_cmd;
/* assume success */
*perrno = 0;
+ /* early check for status command and debug msgs */
+ upd_cmd = i40e_nvmupd_validate_command(hw, cmd, perrno);
+
+ i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d\n",
+ i40e_nvm_update_state_str[upd_cmd],
+ hw->nvmupd_state,
+ hw->aq.nvm_release_on_done);
+
+ if (upd_cmd == I40E_NVMUPD_INVALID) {
+ *perrno = -EFAULT;
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "i40e_nvmupd_validate_command returns %d errno %d\n",
+ upd_cmd, *perrno);
+ }
+
+ /* a status request returns immediately rather than
+ * going into the state machine
+ */
+ if (upd_cmd == I40E_NVMUPD_STATUS) {
+ bytes[0] = hw->nvmupd_state;
+ return 0;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT:
status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno);
@@ -956,12 +981,13 @@ static enum i40e_nvmupd_cmd i40e_nvmupd_validate_command(struct i40e_hw *hw,
int *perrno)
{
enum i40e_nvmupd_cmd upd_cmd;
- u8 transaction;
+ u8 module, transaction;
/* anything that doesn't match a recognized case is an error */
upd_cmd = I40E_NVMUPD_INVALID;
transaction = i40e_nvmupd_get_transaction(cmd->config);
+ module = i40e_nvmupd_get_module(cmd->config);
/* limits on data size */
if ((cmd->data_size < 1) ||
@@ -988,6 +1014,10 @@ static enum i40e_nvmupd_cmd i40e_nvmupd_validate_command(struct i40e_hw *hw,
case I40E_NVM_SA:
upd_cmd = I40E_NVMUPD_READ_SA;
break;
+ case I40E_NVM_EXEC:
+ if (module == 0xf)
+ upd_cmd = I40E_NVMUPD_STATUS;
+ break;
}
break;
@@ -1020,17 +1050,7 @@ static enum i40e_nvmupd_cmd i40e_nvmupd_validate_command(struct i40e_hw *hw,
}
break;
}
- i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d\n",
- i40e_nvm_update_state_str[upd_cmd],
- hw->nvmupd_state,
- hw->aq.nvm_release_on_done);
- if (upd_cmd == I40E_NVMUPD_INVALID) {
- *perrno = -EFAULT;
- i40e_debug(hw, I40E_DEBUG_NVM,
- "i40e_nvmupd_validate_command returns %d errno %d\n",
- upd_cmd, *perrno);
- }
return upd_cmd;
}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index d3558e1..20e16ed 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -307,6 +307,7 @@ enum i40e_nvmupd_cmd {
I40E_NVMUPD_CSUM_CON,
I40E_NVMUPD_CSUM_SA,
I40E_NVMUPD_CSUM_LCB,
+ I40E_NVMUPD_STATUS,
};
enum i40e_nvmupd_state {
@@ -331,6 +332,7 @@ enum i40e_nvmupd_state {
#define I40E_NVM_SA (I40E_NVM_SNT | I40E_NVM_LCB)
#define I40E_NVM_ERA 0x4
#define I40E_NVM_CSUM 0x8
+#define I40E_NVM_EXEC 0xf
#define I40E_NVM_ADAPT_SHIFT 16
#define I40E_NVM_ADAPT_MASK (0xffff << I40E_NVM_ADAPT_SHIFT)
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index c811081..ee02e25 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -306,6 +306,7 @@ enum i40e_nvmupd_cmd {
I40E_NVMUPD_CSUM_CON,
I40E_NVMUPD_CSUM_SA,
I40E_NVMUPD_CSUM_LCB,
+ I40E_NVMUPD_STATUS,
};
enum i40e_nvmupd_state {
@@ -330,6 +331,7 @@ enum i40e_nvmupd_state {
#define I40E_NVM_SA (I40E_NVM_SNT | I40E_NVM_LCB)
#define I40E_NVM_ERA 0x4
#define I40E_NVM_CSUM 0x8
+#define I40E_NVM_EXEC 0xf
#define I40E_NVM_ADAPT_SHIFT 16
#define I40E_NVM_ADAPT_MASK (0xffff << I40E_NVM_ADAPT_SHIFT)
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor Catherine Sullivan
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 21:40 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility Catherine Sullivan
` (11 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Shannon Nelson <shannon.nelson@intel.com>
This adds wait states to the NVM update state machine to signify when
waiting for an update operation to finish, whether we're in the middle
of a set of Write operations, or we're now idle but waiting.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: Iabe91d6579ef6a2ea560647e374035656211ab43
---
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 13 ++++++++
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 48 ++++++++++++++++++++-------
drivers/net/ethernet/intel/i40e/i40e_type.h | 4 ++-
drivers/net/ethernet/intel/i40evf/i40e_type.h | 4 ++-
4 files changed, 55 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index 00404fe..8ba4b60 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -1020,6 +1020,19 @@ clean_arq_element_out:
i40e_release_nvm(hw);
hw->aq.nvm_release_on_done = false;
}
+
+ switch (hw->nvmupd_state) {
+ case I40E_NVMUPD_STATE_INIT_WAIT:
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ break;
+
+ case I40E_NVMUPD_STATE_WRITE_WAIT:
+ hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING;
+ break;
+
+ default:
+ break;
+ }
}
return ret_code;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index 034e27a..d21c652 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -698,6 +698,12 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw,
status = i40e_nvmupd_state_writing(hw, cmd, bytes, perrno);
break;
+ case I40E_NVMUPD_STATE_INIT_WAIT:
+ case I40E_NVMUPD_STATE_WRITE_WAIT:
+ status = I40E_ERR_NOT_READY;
+ *perrno = -EBUSY;
+ break;
+
default:
/* invalid state, should never happen */
i40e_debug(hw, I40E_DEBUG_NVM,
@@ -761,10 +767,12 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
hw->aq.asq_last_status);
} else {
status = i40e_nvmupd_nvm_erase(hw, cmd, perrno);
- if (status)
+ if (status) {
i40e_release_nvm(hw);
- else
+ } else {
hw->aq.nvm_release_on_done = true;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
+ }
}
break;
@@ -775,10 +783,12 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
hw->aq.asq_last_status);
} else {
status = i40e_nvmupd_nvm_write(hw, cmd, bytes, perrno);
- if (status)
+ if (status) {
i40e_release_nvm(hw);
- else
+ } else {
hw->aq.nvm_release_on_done = true;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
+ }
}
break;
@@ -792,7 +802,7 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
if (status)
i40e_release_nvm(hw);
else
- hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_WRITE_WAIT;
}
break;
@@ -811,6 +821,7 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
i40e_release_nvm(hw);
} else {
hw->aq.nvm_release_on_done = true;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
}
}
break;
@@ -840,7 +851,7 @@ static i40e_status i40e_nvmupd_state_reading(struct i40e_hw *hw,
struct i40e_nvm_access *cmd,
u8 *bytes, int *perrno)
{
- i40e_status status;
+ i40e_status status = 0;
enum i40e_nvmupd_cmd upd_cmd;
upd_cmd = i40e_nvmupd_validate_command(hw, cmd, perrno);
@@ -882,7 +893,7 @@ static i40e_status i40e_nvmupd_state_writing(struct i40e_hw *hw,
struct i40e_nvm_access *cmd,
u8 *bytes, int *perrno)
{
- i40e_status status;
+ i40e_status status = 0;
enum i40e_nvmupd_cmd upd_cmd;
bool retry_attempt = false;
@@ -892,13 +903,22 @@ retry:
switch (upd_cmd) {
case I40E_NVMUPD_WRITE_CON:
status = i40e_nvmupd_nvm_write(hw, cmd, bytes, perrno);
+ if (!status)
+ hw->nvmupd_state = I40E_NVMUPD_STATE_WRITE_WAIT;
break;
case I40E_NVMUPD_WRITE_LCB:
status = i40e_nvmupd_nvm_write(hw, cmd, bytes, perrno);
- if (!status)
+ if (status) {
+ *perrno = hw->aq.asq_last_status ?
+ i40e_aq_rc_to_posix(status,
+ hw->aq.asq_last_status) :
+ -EIO;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ } else {
hw->aq.nvm_release_on_done = true;
- hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
+ }
break;
case I40E_NVMUPD_CSUM_CON:
@@ -909,19 +929,23 @@ retry:
hw->aq.asq_last_status) :
-EIO;
hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ } else {
+ hw->nvmupd_state = I40E_NVMUPD_STATE_WRITE_WAIT;
}
break;
case I40E_NVMUPD_CSUM_LCB:
status = i40e_update_nvm_checksum(hw);
- if (status)
+ if (status) {
*perrno = hw->aq.asq_last_status ?
i40e_aq_rc_to_posix(status,
hw->aq.asq_last_status) :
-EIO;
- else
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ } else {
hw->aq.nvm_release_on_done = true;
- hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT_WAIT;
+ }
break;
default:
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 20e16ed..dd0f709 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -313,7 +313,9 @@ enum i40e_nvmupd_cmd {
enum i40e_nvmupd_state {
I40E_NVMUPD_STATE_INIT,
I40E_NVMUPD_STATE_READING,
- I40E_NVMUPD_STATE_WRITING
+ I40E_NVMUPD_STATE_WRITING,
+ I40E_NVMUPD_STATE_INIT_WAIT,
+ I40E_NVMUPD_STATE_WRITE_WAIT,
};
/* nvm_access definition and its masks/shifts need to be accessible to
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index ee02e25..00f4956 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -312,7 +312,9 @@ enum i40e_nvmupd_cmd {
enum i40e_nvmupd_state {
I40E_NVMUPD_STATE_INIT,
I40E_NVMUPD_STATE_READING,
- I40E_NVMUPD_STATE_WRITING
+ I40E_NVMUPD_STATE_WRITING,
+ I40E_NVMUPD_STATE_INIT_WAIT,
+ I40E_NVMUPD_STATE_WRITE_WAIT,
};
/* nvm_access definition and its masks/shifts need to be accessible to
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (2 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 21:46 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result " Catherine Sullivan
` (10 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Shannon Nelson <shannon.nelson@intel.com>
Add a facility to run AQ commands through the nvmupdate utility in order
to allow the update tools to interact with the FW and do special
commands needed for updates and configuration changes.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: I5c41523e4055b37f8e4ee479f7a0574368f4a588
---
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 3 +
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 83 +++++++++++++++++++++++++
drivers/net/ethernet/intel/i40e/i40e_type.h | 2 +
drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 3 +
drivers/net/ethernet/intel/i40evf/i40e_type.h | 2 +
5 files changed, 93 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index 8ba4b60..3e1f0b2 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -657,6 +657,9 @@ i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)
/* destroy the locks */
+ if (hw->nvm_buff.va)
+ i40e_free_virt_mem(hw, &hw->nvm_buff);
+
return ret_code;
}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index d21c652..f91294de 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -617,6 +617,9 @@ static i40e_status i40e_nvmupd_nvm_write(struct i40e_hw *hw,
static i40e_status i40e_nvmupd_nvm_read(struct i40e_hw *hw,
struct i40e_nvm_access *cmd,
u8 *bytes, int *perrno);
+static i40e_status i40e_nvmupd_exec_aq(struct i40e_hw *hw,
+ struct i40e_nvm_access *cmd,
+ u8 *bytes, int *perrno);
static inline u8 i40e_nvmupd_get_module(u32 val)
{
return (u8)(val & I40E_NVM_MOD_PNT_MASK);
@@ -641,6 +644,7 @@ static char *i40e_nvm_update_state_str[] = {
"I40E_NVMUPD_CSUM_SA",
"I40E_NVMUPD_CSUM_LCB",
"I40E_NVMUPD_STATUS",
+ "I40E_NVMUPD_EXEC_AQ",
};
/**
@@ -826,6 +830,10 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
}
break;
+ case I40E_NVMUPD_EXEC_AQ:
+ status = i40e_nvmupd_exec_aq(hw, cmd, bytes, perrno);
+ break;
+
default:
i40e_debug(hw, I40E_DEBUG_NVM,
"NVMUPD: bad cmd %s in init state\n",
@@ -1071,6 +1079,10 @@ static enum i40e_nvmupd_cmd i40e_nvmupd_validate_command(struct i40e_hw *hw,
case (I40E_NVM_CSUM|I40E_NVM_LCB):
upd_cmd = I40E_NVMUPD_CSUM_LCB;
break;
+ case I40E_NVM_EXEC:
+ if (module == 0)
+ upd_cmd = I40E_NVMUPD_EXEC_AQ;
+ break;
}
break;
}
@@ -1079,6 +1091,77 @@ static enum i40e_nvmupd_cmd i40e_nvmupd_validate_command(struct i40e_hw *hw,
}
/**
+ * i40e_nvmupd_exec_aq - Run an AQ command
+ * @hw: pointer to hardware structure
+ * @cmd: pointer to nvm update command buffer
+ * @bytes: pointer to the data buffer
+ * @perrno: pointer to return error code
+ *
+ * cmd structure contains identifiers and data buffer
+ **/
+static i40e_status i40e_nvmupd_exec_aq(struct i40e_hw *hw,
+ struct i40e_nvm_access *cmd,
+ u8 *bytes, int *perrno)
+{
+ struct i40e_asq_cmd_details cmd_details;
+ i40e_status status;
+ struct i40e_aq_desc *aq_desc;
+ u32 buff_size = 0;
+ u8 *buff = NULL;
+ u32 aq_desc_len;
+ u32 aq_data_len;
+
+ i40e_debug(hw, I40E_DEBUG_NVM, "NVMUPD: %s\n", __func__);
+ memset(&cmd_details, 0, sizeof(cmd_details));
+ cmd_details.wb_desc = &hw->nvm_wb_desc;
+
+ aq_desc_len = sizeof(struct i40e_aq_desc);
+ memset(&hw->nvm_wb_desc, 0, aq_desc_len);
+
+ /* get the aq descriptor */
+ if (cmd->data_size < aq_desc_len) {
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "NVMUPD: not enough aq desc bytes for exec, size %d < %d\n",
+ cmd->data_size, aq_desc_len);
+ *perrno = -EINVAL;
+ return I40E_ERR_PARAM;
+ }
+ aq_desc = (struct i40e_aq_desc *)bytes;
+
+ /* if data buffer needed, make sure it's ready */
+ aq_data_len = cmd->data_size - aq_desc_len;
+ buff_size = max_t(u32, aq_data_len, le16_to_cpu(aq_desc->datalen));
+ if (buff_size) {
+ if (!hw->nvm_buff.va) {
+ status = i40e_allocate_virt_mem(hw, &hw->nvm_buff,
+ hw->aq.asq_buf_size);
+ if (status)
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "NVMUPD: i40e_allocate_virt_mem for exec buff failed, %d\n",
+ status);
+ }
+
+ if (hw->nvm_buff.va) {
+ buff = hw->nvm_buff.va;
+ memcpy(buff, &bytes[aq_desc_len], aq_data_len);
+ }
+ }
+
+ /* and away we go! */
+ status = i40e_asq_send_command(hw, aq_desc, buff,
+ buff_size, &cmd_details);
+ if (status) {
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "i40e_nvmupd_exec_aq err %s aq_err %s\n",
+ i40e_stat_str(hw, status),
+ i40e_aq_str(hw, hw->aq.asq_last_status));
+ *perrno = i40e_aq_rc_to_posix(status, hw->aq.asq_last_status);
+ }
+
+ return status;
+}
+
+/**
* i40e_nvmupd_nvm_read - Read NVM
* @hw: pointer to hardware structure
* @cmd: pointer to nvm update command buffer
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index dd0f709..cb36b2a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -308,6 +308,7 @@ enum i40e_nvmupd_cmd {
I40E_NVMUPD_CSUM_SA,
I40E_NVMUPD_CSUM_LCB,
I40E_NVMUPD_STATUS,
+ I40E_NVMUPD_EXEC_AQ,
};
enum i40e_nvmupd_state {
@@ -499,6 +500,7 @@ struct i40e_hw {
/* state of nvm update process */
enum i40e_nvmupd_state nvmupd_state;
struct i40e_aq_desc nvm_wb_desc;
+ struct i40e_virt_mem nvm_buff;
/* HMC info */
struct i40e_hmc_info hmc; /* HMC info struct */
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c
index 48cce43f..cb21e01 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c
@@ -596,6 +596,9 @@ i40e_status i40evf_shutdown_adminq(struct i40e_hw *hw)
/* destroy the locks */
+ if (hw->nvm_buff.va)
+ i40e_free_virt_mem(hw, &hw->nvm_buff);
+
return ret_code;
}
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index 00f4956..5510220 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -307,6 +307,7 @@ enum i40e_nvmupd_cmd {
I40E_NVMUPD_CSUM_SA,
I40E_NVMUPD_CSUM_LCB,
I40E_NVMUPD_STATUS,
+ I40E_NVMUPD_EXEC_AQ,
};
enum i40e_nvmupd_state {
@@ -493,6 +494,7 @@ struct i40e_hw {
/* state of nvm update process */
enum i40e_nvmupd_state nvmupd_state;
struct i40e_aq_desc nvm_wb_desc;
+ struct i40e_virt_mem nvm_buff;
/* HMC info */
struct i40e_hmc_info hmc; /* HMC info struct */
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result command to nvmupdate utility
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (3 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 21:50 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap Catherine Sullivan
` (9 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Shannon Nelson <shannon.nelson@intel.com>
Add a facility to recover the result of a previously run AQ command.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: I21afec2c20c1a5e6ba60c7fbfcbedfff78c10e45
---
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 79 +++++++++++++++++++++++++++
drivers/net/ethernet/intel/i40e/i40e_type.h | 1 +
drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 +
3 files changed, 81 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index f91294de..2142e10 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -620,6 +620,9 @@ static i40e_status i40e_nvmupd_nvm_read(struct i40e_hw *hw,
static i40e_status i40e_nvmupd_exec_aq(struct i40e_hw *hw,
struct i40e_nvm_access *cmd,
u8 *bytes, int *perrno);
+static i40e_status i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
+ struct i40e_nvm_access *cmd,
+ u8 *bytes, int *perrno);
static inline u8 i40e_nvmupd_get_module(u32 val)
{
return (u8)(val & I40E_NVM_MOD_PNT_MASK);
@@ -645,6 +648,7 @@ static char *i40e_nvm_update_state_str[] = {
"I40E_NVMUPD_CSUM_LCB",
"I40E_NVMUPD_STATUS",
"I40E_NVMUPD_EXEC_AQ",
+ "I40E_NVMUPD_GET_AQ_RESULT",
};
/**
@@ -834,6 +838,10 @@ static i40e_status i40e_nvmupd_state_init(struct i40e_hw *hw,
status = i40e_nvmupd_exec_aq(hw, cmd, bytes, perrno);
break;
+ case I40E_NVMUPD_GET_AQ_RESULT:
+ status = i40e_nvmupd_get_aq_result(hw, cmd, bytes, perrno);
+ break;
+
default:
i40e_debug(hw, I40E_DEBUG_NVM,
"NVMUPD: bad cmd %s in init state\n",
@@ -1049,6 +1057,8 @@ static enum i40e_nvmupd_cmd i40e_nvmupd_validate_command(struct i40e_hw *hw,
case I40E_NVM_EXEC:
if (module == 0xf)
upd_cmd = I40E_NVMUPD_STATUS;
+ else if (module == 0)
+ upd_cmd = I40E_NVMUPD_GET_AQ_RESULT;
break;
}
break;
@@ -1162,6 +1172,75 @@ static i40e_status i40e_nvmupd_exec_aq(struct i40e_hw *hw,
}
/**
+ * i40e_nvmupd_get_aq_result - Get the results from the previous exec_aq
+ * @hw: pointer to hardware structure
+ * @cmd: pointer to nvm update command buffer
+ * @bytes: pointer to the data buffer
+ * @perrno: pointer to return error code
+ *
+ * cmd structure contains identifiers and data buffer
+ **/
+static i40e_status i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
+ struct i40e_nvm_access *cmd,
+ u8 *bytes, int *perrno)
+{
+ u32 aq_total_len;
+ u32 aq_desc_len;
+ int remainder;
+ u8 *buff;
+
+ i40e_debug(hw, I40E_DEBUG_NVM, "NVMUPD: %s\n", __func__);
+
+ aq_desc_len = sizeof(struct i40e_aq_desc);
+ aq_total_len = aq_desc_len + le16_to_cpu(hw->nvm_wb_desc.datalen);
+
+ /* check offset range */
+ if (cmd->offset > aq_total_len) {
+ i40e_debug(hw, I40E_DEBUG_NVM, "%s: offset too big %d > %d\n",
+ __func__, cmd->offset, aq_total_len);
+ *perrno = -EINVAL;
+ return I40E_ERR_PARAM;
+ }
+
+ /* check copylength range */
+ if (cmd->data_size > (aq_total_len - cmd->offset)) {
+ int new_len = aq_total_len - cmd->offset;
+
+ i40e_debug(hw, I40E_DEBUG_NVM, "%s: copy length %d too big, trimming to %d\n",
+ __func__, cmd->data_size, new_len);
+ cmd->data_size = new_len;
+ }
+
+ remainder = cmd->data_size;
+ if (cmd->offset < aq_desc_len) {
+ u32 len = aq_desc_len - cmd->offset;
+
+ len = min(len, cmd->data_size);
+ i40e_debug(hw, I40E_DEBUG_NVM, "%s: aq_desc bytes %d to %d\n",
+ __func__, cmd->offset, cmd->offset + len);
+
+ buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset;
+ memcpy(bytes, buff, len);
+
+ bytes += len;
+ remainder -= len;
+ buff = hw->nvm_buff.va;
+ } else {
+ buff = hw->nvm_buff.va + (cmd->offset - aq_desc_len);
+ }
+
+ if (remainder > 0) {
+ int start_byte = buff - (u8 *)hw->nvm_buff.va;
+
+ i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n",
+ __func__, start_byte, start_byte + remainder);
+ memcpy(bytes, buff, remainder);
+ }
+
+ return 0;
+}
+
+/**
* i40e_nvmupd_nvm_read - Read NVM
* @hw: pointer to hardware structure
* @cmd: pointer to nvm update command buffer
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index cb36b2a..d1ec5a4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -309,6 +309,7 @@ enum i40e_nvmupd_cmd {
I40E_NVMUPD_CSUM_LCB,
I40E_NVMUPD_STATUS,
I40E_NVMUPD_EXEC_AQ,
+ I40E_NVMUPD_GET_AQ_RESULT,
};
enum i40e_nvmupd_state {
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index 5510220..a59b60f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -308,6 +308,7 @@ enum i40e_nvmupd_cmd {
I40E_NVMUPD_CSUM_LCB,
I40E_NVMUPD_STATUS,
I40E_NVMUPD_EXEC_AQ,
+ I40E_NVMUPD_GET_AQ_RESULT,
};
enum i40e_nvmupd_state {
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (4 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result " Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 21:52 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably Catherine Sullivan
` (8 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Greg Bowers <gregory.j.bowers@intel.com>
Changes parsing of AQ command Get CEE DCBX OPER CFG (0x0A07). Change is
required because FW creates the oper_prio_tc nibbles reversed from those
in the CEE Priority Group sub-TLV.
Signed-off-by: Greg Bowers <gregory.j.bowers@intel.com>
Change-ID: I7d9d8641bb430d30e286fc3fac909866ef8a0de8
---
drivers/net/ethernet/intel/i40e/i40e_dcb.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
index fbec7d7..6fa07ef 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
@@ -681,15 +681,18 @@ static void i40e_cee_to_dcb_config(
/* CEE PG data to ETS config */
dcbcfg->etscfg.maxtcs = cee_cfg->oper_num_tc;
+ /* Note that the FW creates the oper_prio_tc nibbles reversed
+ * from those in the CEE Priority Group sub-TLV.
+ */
for (i = 0; i < 4; i++) {
tc = (u8)((cee_cfg->oper_prio_tc[i] &
- I40E_CEE_PGID_PRIO_1_MASK) >>
- I40E_CEE_PGID_PRIO_1_SHIFT);
- dcbcfg->etscfg.prioritytable[i*2] = tc;
- tc = (u8)((cee_cfg->oper_prio_tc[i] &
I40E_CEE_PGID_PRIO_0_MASK) >>
I40E_CEE_PGID_PRIO_0_SHIFT);
- dcbcfg->etscfg.prioritytable[i*2 + 1] = tc;
+ dcbcfg->etscfg.prioritytable[i * 2] = tc;
+ tc = (u8)((cee_cfg->oper_prio_tc[i] &
+ I40E_CEE_PGID_PRIO_1_MASK) >>
+ I40E_CEE_PGID_PRIO_1_SHIFT);
+ dcbcfg->etscfg.prioritytable[i * 2 + 1] = tc;
}
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (5 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-16 17:46 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code Catherine Sullivan
` (7 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Mitch Williams <mitch.a.williams@intel.com>
Using VFGEN_RSTAT to detect a VF reset is an endeavor that is fraught
with peril. It's entirely too easy to miss a reset because none of the
bits are sticky. By the time the VF driver reads the register, the reset
may have been processed and cleaned up by the PF driver, leaving the
register in the same state that it was before the reset.
Instead, detect a reset with the VF_ARQLEN register. When the VF is
reset, the enable bit in this register is cleared, and it stays cleared
until the VF driver processes the reset and re-enables the admin queue.
Because we now deal with multiple registers in the reset and watchdog
tasks, rename the rstat_val variable to reg_val.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Id1df17045c0992e607da0162d31807f7fc20d199
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 36 +++++++++++--------------
1 file changed, 16 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 897e1ac..53ecc09 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1419,16 +1419,16 @@ static void i40evf_watchdog_task(struct work_struct *work)
struct i40evf_adapter,
watchdog_task);
struct i40e_hw *hw = &adapter->hw;
- uint32_t rstat_val;
+ u32 reg_val;
if (test_and_set_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section))
goto restart_watchdog;
if (adapter->flags & I40EVF_FLAG_PF_COMMS_FAILED) {
- rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
- I40E_VFGEN_RSTAT_VFR_STATE_MASK;
- if ((rstat_val == I40E_VFR_VFACTIVE) ||
- (rstat_val == I40E_VFR_COMPLETED)) {
+ reg_val = rd32(hw, I40E_VFGEN_RSTAT) &
+ I40E_VFGEN_RSTAT_VFR_STATE_MASK;
+ if ((reg_val == I40E_VFR_VFACTIVE) ||
+ (reg_val == I40E_VFR_COMPLETED)) {
/* A chance for redemption! */
dev_err(&adapter->pdev->dev, "Hardware came out of reset. Attempting reinit.\n");
adapter->state = __I40EVF_STARTUP;
@@ -1453,11 +1453,8 @@ static void i40evf_watchdog_task(struct work_struct *work)
goto watchdog_done;
/* check for reset */
- rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
- I40E_VFGEN_RSTAT_VFR_STATE_MASK;
- if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING) &&
- (rstat_val != I40E_VFR_VFACTIVE) &&
- (rstat_val != I40E_VFR_COMPLETED)) {
+ reg_val = rd32(hw, I40E_VF_ARQLEN1) & I40E_VF_ARQLEN1_ARQENABLE_MASK;
+ if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING) && !reg_val) {
adapter->state = __I40EVF_RESETTING;
adapter->flags |= I40EVF_FLAG_RESET_PENDING;
dev_err(&adapter->pdev->dev, "Hardware reset detected\n");
@@ -1572,7 +1569,7 @@ static void i40evf_reset_task(struct work_struct *work)
struct net_device *netdev = adapter->netdev;
struct i40e_hw *hw = &adapter->hw;
struct i40evf_mac_filter *f;
- uint32_t rstat_val;
+ u32 reg_val;
int i = 0, err;
while (test_and_set_bit(__I40EVF_IN_CRITICAL_TASK,
@@ -1593,12 +1590,11 @@ static void i40evf_reset_task(struct work_struct *work)
/* poll until we see the reset actually happen */
for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
- rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
- I40E_VFGEN_RSTAT_VFR_STATE_MASK;
- if ((rstat_val != I40E_VFR_VFACTIVE) &&
- (rstat_val != I40E_VFR_COMPLETED))
+ reg_val = rd32(hw, I40E_VF_ARQLEN1) &
+ I40E_VF_ARQLEN1_ARQENABLE_MASK;
+ if (!reg_val)
break;
- usleep_range(500, 1000);
+ usleep_range(5000, 10000);
}
if (i == I40EVF_RESET_WAIT_COUNT) {
dev_info(&adapter->pdev->dev, "Never saw reset\n");
@@ -1607,9 +1603,9 @@ static void i40evf_reset_task(struct work_struct *work)
/* wait until the reset is complete and the PF is responding to us */
for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
- rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
- I40E_VFGEN_RSTAT_VFR_STATE_MASK;
- if (rstat_val == I40E_VFR_VFACTIVE)
+ reg_val = rd32(hw, I40E_VFGEN_RSTAT) &
+ I40E_VFGEN_RSTAT_VFR_STATE_MASK;
+ if (reg_val == I40E_VFR_VFACTIVE)
break;
msleep(I40EVF_RESET_WAIT_MS);
}
@@ -1621,7 +1617,7 @@ static void i40evf_reset_task(struct work_struct *work)
/* reset never finished */
dev_err(&adapter->pdev->dev, "Reset never finished (%x)\n",
- rstat_val);
+ reg_val);
adapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED;
if (netif_running(adapter->netdev)) {
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (6 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 22:28 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang Catherine Sullivan
` (6 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Add missings spaces after declarations, remove another __func__ use,
remove uncessary braces, remove unneeded breaks, and useless returns,
and generally fix up some code.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: Ie715d6b64976c50e1c21531685fe0a2bd38c4244
---
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_common.c | 9 +-
drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 124 ++++++++++++---------
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 -
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 39 ++++---
drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 ++-
drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 3 +-
drivers/net/ethernet/intel/i40evf/i40e_common.c | 8 +-
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 +-
drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 +
drivers/net/ethernet/intel/i40evf/i40evf.h | 4 -
17 files changed, 125 insertions(+), 103 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index 3e1f0b2..bfe8979 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -681,8 +681,7 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)
details = I40E_ADMINQ_DETAILS(*asq, ntc);
while (rd32(hw, hw->aq.asq.head) != ntc) {
i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
- "%s: ntc %d head %d.\n", __func__, ntc,
- rd32(hw, hw->aq.asq.head));
+ "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head));
if (details->callback) {
I40E_ADMINQ_CALLBACK cb_func =
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 2839ea5..2d012d9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1035,7 +1035,7 @@ i40e_status i40e_get_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL);
if (flags & I40E_AQC_LAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac));
+ ether_addr_copy(mac_addr, addrs.pf_lan_mac);
return status;
}
@@ -1058,7 +1058,7 @@ i40e_status i40e_get_port_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
return status;
if (flags & I40E_AQC_PORT_ADDR_VALID)
- memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac));
+ ether_addr_copy(mac_addr, addrs.port_mac);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -1116,7 +1116,7 @@ i40e_status i40e_get_san_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
return status;
if (flags & I40E_AQC_SAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac));
+ ether_addr_copy(mac_addr, addrs.pf_san_mac);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -2363,6 +2363,7 @@ i40e_status i40e_aq_get_veb_parameters(struct i40e_hw *hw,
*vebs_free = le16_to_cpu(cmd_resp->vebs_free);
if (floating) {
u16 flags = le16_to_cpu(cmd_resp->veb_flags);
+
if (flags & I40E_AQC_ADD_VEB_FLOATING)
*floating = true;
else
@@ -3777,7 +3778,7 @@ i40e_status i40e_aq_add_rem_control_packet_filter(struct i40e_hw *hw,
}
if (mac_addr)
- memcpy(cmd->mac, mac_addr, ETH_ALEN);
+ ether_addr_copy(cmd->mac, mac_addr);
cmd->etype = cpu_to_le16(ethtype);
cmd->flags = cpu_to_le16(flags);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c b/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
index dbadad7..7c42d13 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
@@ -236,6 +236,7 @@ static void i40e_dcbnl_del_app(struct i40e_pf *pf,
struct i40e_dcb_app_priority_table *app)
{
int v, err;
+
for (v = 0; v < pf->num_alloc_vsi; v++) {
if (pf->vsi[v] && pf->vsi[v]->netdev) {
err = i40e_dcbnl_vsi_del_app(pf->vsi[v], app);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 1556c4e..e19d479 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -404,82 +404,82 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
nstat = i40e_get_vsi_stats_struct(vsi);
dev_info(&pf->pdev->dev,
" net_stats: rx_packets = %lu, rx_bytes = %lu, rx_errors = %lu, rx_dropped = %lu\n",
- (long unsigned int)nstat->rx_packets,
- (long unsigned int)nstat->rx_bytes,
- (long unsigned int)nstat->rx_errors,
- (long unsigned int)nstat->rx_dropped);
+ (unsigned long int)nstat->rx_packets,
+ (unsigned long int)nstat->rx_bytes,
+ (unsigned long int)nstat->rx_errors,
+ (unsigned long int)nstat->rx_dropped);
dev_info(&pf->pdev->dev,
" net_stats: tx_packets = %lu, tx_bytes = %lu, tx_errors = %lu, tx_dropped = %lu\n",
- (long unsigned int)nstat->tx_packets,
- (long unsigned int)nstat->tx_bytes,
- (long unsigned int)nstat->tx_errors,
- (long unsigned int)nstat->tx_dropped);
+ (unsigned long int)nstat->tx_packets,
+ (unsigned long int)nstat->tx_bytes,
+ (unsigned long int)nstat->tx_errors,
+ (unsigned long int)nstat->tx_dropped);
dev_info(&pf->pdev->dev,
" net_stats: multicast = %lu, collisions = %lu\n",
- (long unsigned int)nstat->multicast,
- (long unsigned int)nstat->collisions);
+ (unsigned long int)nstat->multicast,
+ (unsigned long int)nstat->collisions);
dev_info(&pf->pdev->dev,
" net_stats: rx_length_errors = %lu, rx_over_errors = %lu, rx_crc_errors = %lu\n",
- (long unsigned int)nstat->rx_length_errors,
- (long unsigned int)nstat->rx_over_errors,
- (long unsigned int)nstat->rx_crc_errors);
+ (unsigned long int)nstat->rx_length_errors,
+ (unsigned long int)nstat->rx_over_errors,
+ (unsigned long int)nstat->rx_crc_errors);
dev_info(&pf->pdev->dev,
" net_stats: rx_frame_errors = %lu, rx_fifo_errors = %lu, rx_missed_errors = %lu\n",
- (long unsigned int)nstat->rx_frame_errors,
- (long unsigned int)nstat->rx_fifo_errors,
- (long unsigned int)nstat->rx_missed_errors);
+ (unsigned long int)nstat->rx_frame_errors,
+ (unsigned long int)nstat->rx_fifo_errors,
+ (unsigned long int)nstat->rx_missed_errors);
dev_info(&pf->pdev->dev,
" net_stats: tx_aborted_errors = %lu, tx_carrier_errors = %lu, tx_fifo_errors = %lu\n",
- (long unsigned int)nstat->tx_aborted_errors,
- (long unsigned int)nstat->tx_carrier_errors,
- (long unsigned int)nstat->tx_fifo_errors);
+ (unsigned long int)nstat->tx_aborted_errors,
+ (unsigned long int)nstat->tx_carrier_errors,
+ (unsigned long int)nstat->tx_fifo_errors);
dev_info(&pf->pdev->dev,
" net_stats: tx_heartbeat_errors = %lu, tx_window_errors = %lu\n",
- (long unsigned int)nstat->tx_heartbeat_errors,
- (long unsigned int)nstat->tx_window_errors);
+ (unsigned long int)nstat->tx_heartbeat_errors,
+ (unsigned long int)nstat->tx_window_errors);
dev_info(&pf->pdev->dev,
" net_stats: rx_compressed = %lu, tx_compressed = %lu\n",
- (long unsigned int)nstat->rx_compressed,
- (long unsigned int)nstat->tx_compressed);
+ (unsigned long int)nstat->rx_compressed,
+ (unsigned long int)nstat->tx_compressed);
dev_info(&pf->pdev->dev,
" net_stats_offsets: rx_packets = %lu, rx_bytes = %lu, rx_errors = %lu, rx_dropped = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.rx_packets,
- (long unsigned int)vsi->net_stats_offsets.rx_bytes,
- (long unsigned int)vsi->net_stats_offsets.rx_errors,
- (long unsigned int)vsi->net_stats_offsets.rx_dropped);
+ (unsigned long int)vsi->net_stats_offsets.rx_packets,
+ (unsigned long int)vsi->net_stats_offsets.rx_bytes,
+ (unsigned long int)vsi->net_stats_offsets.rx_errors,
+ (unsigned long int)vsi->net_stats_offsets.rx_dropped);
dev_info(&pf->pdev->dev,
" net_stats_offsets: tx_packets = %lu, tx_bytes = %lu, tx_errors = %lu, tx_dropped = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.tx_packets,
- (long unsigned int)vsi->net_stats_offsets.tx_bytes,
- (long unsigned int)vsi->net_stats_offsets.tx_errors,
- (long unsigned int)vsi->net_stats_offsets.tx_dropped);
+ (unsigned long int)vsi->net_stats_offsets.tx_packets,
+ (unsigned long int)vsi->net_stats_offsets.tx_bytes,
+ (unsigned long int)vsi->net_stats_offsets.tx_errors,
+ (unsigned long int)vsi->net_stats_offsets.tx_dropped);
dev_info(&pf->pdev->dev,
" net_stats_offsets: multicast = %lu, collisions = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.multicast,
- (long unsigned int)vsi->net_stats_offsets.collisions);
+ (unsigned long int)vsi->net_stats_offsets.multicast,
+ (unsigned long int)vsi->net_stats_offsets.collisions);
dev_info(&pf->pdev->dev,
" net_stats_offsets: rx_length_errors = %lu, rx_over_errors = %lu, rx_crc_errors = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.rx_length_errors,
- (long unsigned int)vsi->net_stats_offsets.rx_over_errors,
- (long unsigned int)vsi->net_stats_offsets.rx_crc_errors);
+ (unsigned long int)vsi->net_stats_offsets.rx_length_errors,
+ (unsigned long int)vsi->net_stats_offsets.rx_over_errors,
+ (unsigned long int)vsi->net_stats_offsets.rx_crc_errors);
dev_info(&pf->pdev->dev,
" net_stats_offsets: rx_frame_errors = %lu, rx_fifo_errors = %lu, rx_missed_errors = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.rx_frame_errors,
- (long unsigned int)vsi->net_stats_offsets.rx_fifo_errors,
- (long unsigned int)vsi->net_stats_offsets.rx_missed_errors);
+ (unsigned long int)vsi->net_stats_offsets.rx_frame_errors,
+ (unsigned long int)vsi->net_stats_offsets.rx_fifo_errors,
+ (unsigned long int)vsi->net_stats_offsets.rx_missed_errors);
dev_info(&pf->pdev->dev,
" net_stats_offsets: tx_aborted_errors = %lu, tx_carrier_errors = %lu, tx_fifo_errors = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.tx_aborted_errors,
- (long unsigned int)vsi->net_stats_offsets.tx_carrier_errors,
- (long unsigned int)vsi->net_stats_offsets.tx_fifo_errors);
+ (unsigned long int)vsi->net_stats_offsets.tx_aborted_errors,
+ (unsigned long int)vsi->net_stats_offsets.tx_carrier_errors,
+ (unsigned long int)vsi->net_stats_offsets.tx_fifo_errors);
dev_info(&pf->pdev->dev,
" net_stats_offsets: tx_heartbeat_errors = %lu, tx_window_errors = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.tx_heartbeat_errors,
- (long unsigned int)vsi->net_stats_offsets.tx_window_errors);
+ (unsigned long int)vsi->net_stats_offsets.tx_heartbeat_errors,
+ (unsigned long int)vsi->net_stats_offsets.tx_window_errors);
dev_info(&pf->pdev->dev,
" net_stats_offsets: rx_compressed = %lu, tx_compressed = %lu\n",
- (long unsigned int)vsi->net_stats_offsets.rx_compressed,
- (long unsigned int)vsi->net_stats_offsets.tx_compressed);
+ (unsigned long int)vsi->net_stats_offsets.rx_compressed,
+ (unsigned long int)vsi->net_stats_offsets.tx_compressed);
dev_info(&pf->pdev->dev,
" tx_restart = %d, tx_busy = %d, rx_buf_failed = %d, rx_page_failed = %d\n",
vsi->tx_restart, vsi->tx_busy,
@@ -487,6 +487,7 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
rcu_read_lock();
for (i = 0; i < vsi->num_queue_pairs; i++) {
struct i40e_ring *rx_ring = ACCESS_ONCE(vsi->rx_rings[i]);
+
if (!rx_ring)
continue;
@@ -527,7 +528,7 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
dev_info(&pf->pdev->dev,
" rx_rings[%i]: size = %i, dma = 0x%08lx\n",
i, rx_ring->size,
- (long unsigned int)rx_ring->dma);
+ (unsigned long int)rx_ring->dma);
dev_info(&pf->pdev->dev,
" rx_rings[%i]: vsi = %p, q_vector = %p\n",
i, rx_ring->vsi,
@@ -535,6 +536,7 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
}
for (i = 0; i < vsi->num_queue_pairs; i++) {
struct i40e_ring *tx_ring = ACCESS_ONCE(vsi->tx_rings[i]);
+
if (!tx_ring)
continue;
@@ -573,7 +575,7 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
dev_info(&pf->pdev->dev,
" tx_rings[%i]: size = %i, dma = 0x%08lx\n",
i, tx_ring->size,
- (long unsigned int)tx_ring->dma);
+ (unsigned long int)tx_ring->dma);
dev_info(&pf->pdev->dev,
" tx_rings[%i]: vsi = %p, q_vector = %p\n",
i, tx_ring->vsi,
@@ -743,6 +745,7 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf)
ring = &(hw->aq.asq);
for (i = 0; i < ring->count; i++) {
struct i40e_aq_desc *d = I40E_ADMINQ_DESC(*ring, i);
+
dev_info(&pf->pdev->dev,
" at[%02d] flags=0x%04x op=0x%04x dlen=0x%04x ret=0x%04x cookie_h=0x%08x cookie_l=0x%08x\n",
i, d->flags, d->opcode, d->datalen, d->retval,
@@ -755,6 +758,7 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf)
ring = &(hw->aq.arq);
for (i = 0; i < ring->count; i++) {
struct i40e_aq_desc *d = I40E_ADMINQ_DESC(*ring, i);
+
dev_info(&pf->pdev->dev,
" ar[%02d] flags=0x%04x op=0x%04x dlen=0x%04x ret=0x%04x cookie_h=0x%08x cookie_l=0x%08x\n",
i, d->flags, d->opcode, d->datalen, d->retval,
@@ -1038,7 +1042,13 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf);
} else if (strncmp(cmd_buf, "del vsi", 7) == 0) {
- sscanf(&cmd_buf[7], "%i", &vsi_seid);
+ cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid);
+ if (cnt != 1) {
+ dev_info(&pf->pdev->dev,
+ "del vsi: bad command string, cnt=%d\n",
+ cnt);
+ goto command_write_done;
+ }
vsi = i40e_dbg_find_vsi(pf, vsi_seid);
if (!vsi) {
dev_info(&pf->pdev->dev, "del VSI %d: seid not found\n",
@@ -1488,6 +1498,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
} else if (strncmp(cmd_buf, "read", 4) == 0) {
u32 address;
u32 value;
+
cnt = sscanf(&cmd_buf[4], "%i", &address);
if (cnt != 1) {
dev_info(&pf->pdev->dev, "read <reg>\n");
@@ -1507,6 +1518,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
} else if (strncmp(cmd_buf, "write", 5) == 0) {
u32 address, value;
+
cnt = sscanf(&cmd_buf[5], "%i %i", &address, &value);
if (cnt != 2) {
dev_info(&pf->pdev->dev, "write <reg> <value>\n");
@@ -1528,6 +1540,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
cnt = sscanf(&cmd_buf[15], "%i", &vsi_seid);
if (cnt == 0) {
int i;
+
for (i = 0; i < pf->num_alloc_vsi; i++)
i40e_vsi_reset_stats(pf->vsi[i]);
dev_info(&pf->pdev->dev, "vsi clear stats called for all vsi's\n");
@@ -1726,8 +1739,9 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
packet_len, I40E_FDIR_MAX_RAW_PACKET_SIZE);
for (i = 0; i < packet_len; i++) {
- sscanf(&asc_packet[j], "%2hhx ",
- &raw_packet[i]);
+ cnt = sscanf(&asc_packet[j], "%2hhx ", &raw_packet[i]);
+ if (!cnt)
+ break;
j += 3;
}
dev_info(&pf->pdev->dev, "FD raw packet dump\n");
@@ -1755,6 +1769,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
} else if (strncmp(cmd_buf, "lldp", 4) == 0) {
if (strncmp(&cmd_buf[5], "stop", 4) == 0) {
int ret;
+
ret = i40e_aq_stop_lldp(&pf->hw, false, NULL);
if (ret) {
dev_info(&pf->pdev->dev,
@@ -1779,6 +1794,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
#endif /* CONFIG_I40E_DCB */
} else if (strncmp(&cmd_buf[5], "start", 5) == 0) {
int ret;
+
ret = i40e_aq_add_rem_control_packet_filter(&pf->hw,
pf->hw.mac.addr,
I40E_ETH_P_LLDP, 0,
@@ -1807,6 +1823,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
u16 llen, rlen;
int ret;
u8 *buff;
+
buff = kzalloc(I40E_LLDPDU_SIZE, GFP_KERNEL);
if (!buff)
goto command_write_done;
@@ -1833,6 +1850,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
u16 llen, rlen;
int ret;
u8 *buff;
+
buff = kzalloc(I40E_LLDPDU_SIZE, GFP_KERNEL);
if (!buff)
goto command_write_done;
@@ -1858,6 +1876,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
buff = NULL;
} else if (strncmp(&cmd_buf[5], "event on", 8) == 0) {
int ret;
+
ret = i40e_aq_cfg_lldp_mib_change_event(&pf->hw,
true, NULL);
if (ret) {
@@ -1868,6 +1887,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
}
} else if (strncmp(&cmd_buf[5], "event off", 9) == 0) {
int ret;
+
ret = i40e_aq_cfg_lldp_mib_change_event(&pf->hw,
false, NULL);
if (ret) {
@@ -2105,6 +2125,7 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
}
} else if (strncmp(i40e_dbg_netdev_ops_buf, "change_mtu", 10) == 0) {
int mtu;
+
cnt = sscanf(&i40e_dbg_netdev_ops_buf[11], "%i %i",
&vsi_seid, &mtu);
if (cnt != 2) {
@@ -2220,7 +2241,6 @@ void i40e_dbg_pf_init(struct i40e_pf *pf)
create_failed:
dev_info(dev, "debugfs dir/file for %s failed\n", name);
debugfs_remove_recursive(pf->i40e_dbg_pf);
- return;
}
/**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 5a726f2..148f614 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1360,6 +1360,7 @@ static void i40e_get_ethtool_stats(struct net_device *netdev,
if ((pf->lan_veb != I40E_NO_VEB) &&
(pf->flags & I40E_FLAG_VEB_STATS_ENABLED)) {
struct i40e_veb *veb = pf->veb[pf->lan_veb];
+
for (j = 0; j < I40E_VEB_STATS_LEN; j++) {
p = (char *)veb;
p += i40e_gstrings_veb_stats[j].stat_offset;
@@ -1607,7 +1608,7 @@ static inline bool i40e_active_vfs(struct i40e_pf *pf)
int i;
for (i = 0; i < pf->num_alloc_vfs; i++)
- if (vfs[i].vf_states & I40E_VF_STAT_ACTIVE)
+ if (test_bit(I40E_VF_STAT_ACTIVE, &vfs[i].vf_states))
return true;
return false;
}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 2398d9b..eaedc1f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -324,7 +324,6 @@ void i40e_init_pf_fcoe(struct i40e_pf *pf)
wr32(hw, I40E_GLFCOE_RCTL, val);
dev_info(&pf->pdev->dev, "FCoE is supported.\n");
- return;
}
/**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
index fa371a2..79ae7be 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
@@ -431,9 +431,8 @@ exit_sd_error:
pd_idx1 = max(pd_idx,
((j - 1) * I40E_HMC_MAX_BP_COUNT));
pd_lmt1 = min(pd_lmt, (j * I40E_HMC_MAX_BP_COUNT));
- for (i = pd_idx1; i < pd_lmt1; i++) {
+ for (i = pd_idx1; i < pd_lmt1; i++)
i40e_remove_pd_bp(hw, info->hmc_info, i);
- }
i40e_remove_pd_page(hw, info->hmc_info, (j - 1));
break;
case I40E_SD_TYPE_DIRECT:
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2ea4cdd..87ad491 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -216,10 +216,10 @@ static int i40e_get_lump(struct i40e_pf *pf, struct i40e_lump_tracking *pile,
ret = i;
pile->search_hint = i + j;
break;
- } else {
- /* not enough, so skip over it and continue looking */
- i += j;
}
+
+ /* not enough, so skip over it and continue looking */
+ i += j;
}
return ret;
@@ -460,11 +460,11 @@ void i40e_vsi_reset_stats(struct i40e_vsi *vsi)
memset(&vsi->eth_stats_offsets, 0, sizeof(vsi->eth_stats_offsets));
if (vsi->rx_rings && vsi->rx_rings[0]) {
for (i = 0; i < vsi->num_queue_pairs; i++) {
- memset(&vsi->rx_rings[i]->stats, 0 ,
+ memset(&vsi->rx_rings[i]->stats, 0,
sizeof(vsi->rx_rings[i]->stats));
- memset(&vsi->rx_rings[i]->rx_stats, 0 ,
+ memset(&vsi->rx_rings[i]->rx_stats, 0,
sizeof(vsi->rx_rings[i]->rx_stats));
- memset(&vsi->tx_rings[i]->stats, 0 ,
+ memset(&vsi->tx_rings[i]->stats, 0,
sizeof(vsi->tx_rings[i]->stats));
memset(&vsi->tx_rings[i]->tx_stats, 0,
sizeof(vsi->tx_rings[i]->tx_stats));
@@ -782,6 +782,7 @@ static void i40e_update_link_xoff_rx(struct i40e_pf *pf)
for (i = 0; i < vsi->num_queue_pairs; i++) {
struct i40e_ring *ring = vsi->tx_rings[i];
+
clear_bit(__I40E_HANG_CHECK_ARMED, &ring->state);
}
}
@@ -813,6 +814,7 @@ static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
u64 prio_xoff = nsd->priority_xoff_rx[i];
+
i40e_stat_update32(hw, I40E_GLPRT_PXOFFRXC(hw->port, i),
pf->stat_offsets_loaded,
&osd->priority_xoff_rx[i],
@@ -1426,6 +1428,7 @@ void i40e_del_filter(struct i40e_vsi *vsi,
} else {
/* make sure we don't remove a filter in use by VF or netdev */
int min_f = 0;
+
min_f += (f->is_vf ? 1 : 0);
min_f += (f->is_netdev ? 1 : 0);
@@ -1484,6 +1487,7 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
if (vsi->type == I40E_VSI_MAIN) {
i40e_status ret;
+
ret = i40e_aq_mac_address_write(&vsi->back->hw,
I40E_AQC_WRITE_TYPE_LAA_WOL,
addr->sa_data, NULL);
@@ -1918,6 +1922,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
/* check for changes in promiscuous modes */
if (changed_flags & IFF_ALLMULTI) {
bool cur_multipromisc;
+
cur_multipromisc = !!(vsi->current_netdev_flags & IFF_ALLMULTI);
ret = i40e_aq_set_vsi_multicast_promiscuous(&vsi->back->hw,
vsi->seid,
@@ -1932,6 +1937,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
}
if ((changed_flags & IFF_PROMISC) || promisc_forced_on) {
bool cur_promisc;
+
cur_promisc = (!!(vsi->current_netdev_flags & IFF_PROMISC) ||
test_bit(__I40E_FILTER_OVERFLOW_PROMISC,
&vsi->state));
@@ -3222,6 +3228,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
/* temporarily disable queue cause for NAPI processing */
u32 qval = rd32(hw, I40E_QINT_RQCTL(0));
+
qval &= ~I40E_QINT_RQCTL_CAUSE_ENA_MASK;
wr32(hw, I40E_QINT_RQCTL(0), qval);
@@ -3391,9 +3398,9 @@ static bool i40e_clean_fdir_tx_irq(struct i40e_ring *tx_ring, int budget)
i += tx_ring->count;
tx_ring->next_to_clean = i;
- if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
+ if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED)
i40e_irq_dynamic_enable(vsi, tx_ring->q_vector->v_idx);
- }
+
return budget > 0;
}
@@ -3996,11 +4003,10 @@ static void i40e_quiesce_vsi(struct i40e_vsi *vsi)
}
set_bit(__I40E_NEEDS_RESTART, &vsi->state);
- if (vsi->netdev && netif_running(vsi->netdev)) {
+ if (vsi->netdev && netif_running(vsi->netdev))
vsi->netdev->netdev_ops->ndo_stop(vsi->netdev);
- } else {
+ else
i40e_vsi_close(vsi);
- }
}
/**
@@ -5173,15 +5179,13 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags)
"VSI reinit requested\n");
for (v = 0; v < pf->num_alloc_vsi; v++) {
struct i40e_vsi *vsi = pf->vsi[v];
+
if (vsi != NULL &&
test_bit(__I40E_REINIT_REQUESTED, &vsi->state)) {
i40e_vsi_reinit_locked(pf->vsi[v]);
clear_bit(__I40E_REINIT_REQUESTED, &vsi->state);
}
}
-
- /* no further action needed, so return now */
- return;
} else if (reset_flags & BIT_ULL(__I40E_DOWN_REQUESTED)) {
int v;
@@ -5189,6 +5193,7 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags)
dev_info(&pf->pdev->dev, "VSI down requested\n");
for (v = 0; v < pf->num_alloc_vsi; v++) {
struct i40e_vsi *vsi = pf->vsi[v];
+
if (vsi != NULL &&
test_bit(__I40E_DOWN_REQUESTED, &vsi->state)) {
set_bit(__I40E_DOWN, &vsi->state);
@@ -5196,13 +5201,9 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags)
clear_bit(__I40E_DOWN_REQUESTED, &vsi->state);
}
}
-
- /* no further action needed, so return now */
- return;
} else {
dev_info(&pf->pdev->dev,
"bad reset request 0x%08x\n", reset_flags);
- return;
}
}
@@ -6209,6 +6210,7 @@ static int i40e_reconstitute_veb(struct i40e_veb *veb)
if (pf->vsi[v]->veb_idx == veb->idx) {
struct i40e_vsi *vsi = pf->vsi[v];
+
vsi->uplink_seid = veb->seid;
ret = i40e_add_vsi(vsi);
if (ret) {
@@ -9699,6 +9701,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
} else {
/* force a reset of TC and queue layout configurations */
u8 enabled_tc = pf->vsi[pf->lan_vsi]->tc_config.enabled_tc;
+
pf->vsi[pf->lan_vsi]->tc_config.enabled_tc = 0;
pf->vsi[pf->lan_vsi]->seid = pf->main_vsi_seid;
i40e_vsi_config_tc(pf->vsi[pf->lan_vsi], enabled_tc);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 8c40d6e..552c84e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -618,9 +618,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)
/* Attempt to register the clock before enabling the hardware. */
pf->ptp_clock = ptp_clock_register(&pf->ptp_caps, &pf->pdev->dev);
- if (IS_ERR(pf->ptp_clock)) {
+ if (IS_ERR(pf->ptp_clock))
return PTR_ERR(pf->ptp_clock);
- }
/* clear the hwtstamp settings here during clock create, instead of
* during regular init, so that we can maintain settings across a
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 4232217..2144f58 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1599,6 +1599,7 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget)
cleaned_count++;
if (rx_hbo || rx_sph) {
int len;
+
if (rx_hbo)
len = I40E_RX_HDR_SIZE;
else
@@ -1784,9 +1785,6 @@ static int i40e_clean_rx_irq_1buf(struct i40e_ring *rx_ring, int budget)
/* ERR_MASK will only have valid bits if EOP set */
if (unlikely(rx_error & BIT(I40E_RX_DESC_ERROR_RXE_SHIFT))) {
dev_kfree_skb_any(skb);
- /* TODO: shouldn't we increment a counter indicating the
- * drop?
- */
continue;
}
@@ -2158,6 +2156,7 @@ static inline int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
/* else if it is a SW VLAN, check the next protocol and store the tag */
} else if (protocol == htons(ETH_P_8021Q)) {
struct vlan_hdr *vhdr, _vhdr;
+
vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr);
if (!vhdr)
return -EINVAL;
@@ -2778,6 +2777,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
u8 hdr_len = 0;
int tsyn;
int tso;
+
if (0 == i40e_xmit_descriptor_count(skb, tx_ring))
return NETDEV_TX_BUSY;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index c6d2995..12612ee 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -165,6 +165,7 @@ struct i40e_tx_buffer {
};
unsigned int bytecount;
unsigned short gso_segs;
+
DEFINE_DMA_UNMAP_ADDR(dma);
DEFINE_DMA_UNMAP_LEN(len);
u32 tx_flags;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index aa4e44c..f42c7c1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -536,6 +536,7 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, enum i40e_vsi_type type)
}
if (type == I40E_VSI_SRIOV) {
u8 brdcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
vf->lan_vsi_idx = vsi->idx;
vf->lan_vsi_id = vsi->id;
/* If the port VLAN has been configured and then the
@@ -605,6 +606,7 @@ static void i40e_enable_vf_mappings(struct i40e_vf *vf)
/* map PF queues to VF queues */
for (j = 0; j < pf->vsi[vf->lan_vsi_idx]->alloc_queue_pairs; j++) {
u16 qid = i40e_vc_get_pf_queue_id(vf, vf->lan_vsi_id, j);
+
reg = (qid & I40E_VPLAN_QTABLE_QINDEX_MASK);
wr32(hw, I40E_VPLAN_QTABLE(total_queue_pairs, vf->vf_id), reg);
total_queue_pairs++;
@@ -991,7 +993,7 @@ static int i40e_pci_sriov_enable(struct pci_dev *pdev, int num_vfs)
int pre_existing_vfs = pci_num_vf(pdev);
int err = 0;
- if (pf->state & __I40E_TESTING) {
+ if (test_bit(__I40E_TESTING, &pf->state)) {
dev_warn(&pdev->dev,
"Cannot enable SR-IOV virtual functions while the device is undergoing diagnostic testing\n");
err = -EPERM;
@@ -1210,8 +1212,8 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
vfres->vsi_res[i].vsi_type = I40E_VSI_SRIOV;
vfres->vsi_res[i].num_queue_pairs =
pf->vsi[vf->lan_vsi_idx]->alloc_queue_pairs;
- memcpy(vfres->vsi_res[i].default_mac_addr,
- vf->default_lan_addr.addr, ETH_ALEN);
+ ether_addr_copy(vfres->vsi_res[i].default_mac_addr,
+ vf->default_lan_addr.addr);
i++;
}
set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states);
@@ -1715,6 +1717,7 @@ static int i40e_vc_add_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
for (i = 0; i < vfl->num_elements; i++) {
/* add new VLAN filter */
int ret = i40e_vsi_add_vlan(vsi, vfl->vlan_id[i]);
+
if (ret)
dev_err(&pf->pdev->dev,
"Unable to add VF vlan filter %d, error %d\n",
@@ -1766,6 +1769,7 @@ static int i40e_vc_remove_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
for (i = 0; i < vfl->num_elements; i++) {
int ret = i40e_vsi_kill_vlan(vsi, vfl->vlan_id[i]);
+
if (ret)
dev_err(&pf->pdev->dev,
"Unable to delete VF vlan filter %d, error %d\n",
@@ -1877,7 +1881,6 @@ static int i40e_vc_validate_vf_msg(struct i40e_vf *vf, u32 v_opcode,
case I40E_VIRTCHNL_OP_UNKNOWN:
default:
return -EPERM;
- break;
}
/* few more checks */
if ((valid_len != msglen) || (err_msg_format)) {
@@ -2316,7 +2319,7 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
ivi->vf = vf_id;
- memcpy(&ivi->mac, vf->default_lan_addr.addr, ETH_ALEN);
+ ether_addr_copy(ivi->mac, vf->default_lan_addr.addr);
ivi->max_tx_rate = vf->tx_rate;
ivi->min_tx_rate = 0;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c
index cb21e01..7b5993b 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c
@@ -620,8 +620,7 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)
details = I40E_ADMINQ_DETAILS(*asq, ntc);
while (rd32(hw, hw->aq.asq.head) != ntc) {
i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
- "%s: ntc %d head %d.\n", __func__, ntc,
- rd32(hw, hw->aq.asq.head));
+ "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head));
if (details->callback) {
I40E_ADMINQ_CALLBACK cb_func =
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index 96e48ee..b98b642 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -992,10 +992,10 @@ void i40e_vf_parse_hw_config(struct i40e_hw *hw,
I40E_VIRTCHNL_VF_OFFLOAD_FCOE) ? 1 : 0;
for (i = 0; i < msg->num_vsis; i++) {
if (vsi_res->vsi_type == I40E_VSI_SRIOV) {
- memcpy(hw->mac.perm_addr, vsi_res->default_mac_addr,
- ETH_ALEN);
- memcpy(hw->mac.addr, vsi_res->default_mac_addr,
- ETH_ALEN);
+ ether_addr_copy(hw->mac.perm_addr,
+ vsi_res->default_mac_addr);
+ ether_addr_copy(hw->mac.addr,
+ vsi_res->default_mac_addr);
}
vsi_res++;
}
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 1d0e38f..45260c2 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1065,6 +1065,7 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget)
cleaned_count++;
if (rx_hbo || rx_sph) {
int len;
+
if (rx_hbo)
len = I40E_RX_HDR_SIZE;
else
@@ -1238,9 +1239,6 @@ static int i40e_clean_rx_irq_1buf(struct i40e_ring *rx_ring, int budget)
/* ERR_MASK will only have valid bits if EOP set */
if (unlikely(rx_error & BIT(I40E_RX_DESC_ERROR_RXE_SHIFT))) {
dev_kfree_skb_any(skb);
- /* TODO: shouldn't we increment a counter indicating the
- * drop?
- */
continue;
}
@@ -1436,6 +1434,7 @@ static inline int i40evf_tx_prepare_vlan_flags(struct sk_buff *skb,
/* else if it is a SW VLAN, check the next protocol and store the tag */
} else if (protocol == htons(ETH_P_8021Q)) {
struct vlan_hdr *vhdr, _vhdr;
+
vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr);
if (!vhdr)
return -EINVAL;
@@ -1978,6 +1977,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
u32 td_cmd = 0;
u8 hdr_len = 0;
int tso;
+
if (0 == i40evf_xmit_descriptor_count(skb, tx_ring))
return NETDEV_TX_BUSY;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index e8dd651..26fc85f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -164,6 +164,7 @@ struct i40e_tx_buffer {
};
unsigned int bytecount;
unsigned short gso_segs;
+
DEFINE_DMA_UNMAP_ADDR(dma);
DEFINE_DMA_UNMAP_LEN(len);
u32 tx_flags;
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index 3817cbb..27dc3fe 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -48,10 +48,6 @@
#define DEFAULT_DEBUG_LEVEL_SHIFT 3
#define PFX "i40evf: "
-#define DPRINTK(nlevel, klevel, fmt, args...) \
- ((void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \
- printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \
- __func__ , ## args)))
/* dummy struct to make common code less painful */
struct i40e_vsi {
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (7 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 22:30 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent Catherine Sullivan
` (5 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
We were missing an else so add it back in.
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
---
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 45260c2..7b20f53 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -191,6 +191,8 @@ static bool i40e_check_tx_hang(struct i40e_ring *tx_ring)
&tx_ring->state);
} else if (tx_done_old == tx_done &&
(tx_pending < I40E_MIN_DESC_PENDING) && (tx_pending > 0)) {
+ /* do nothing */
+ } else {
/* update completed stats and disarm the hang check */
tx_ring->tx_stats.tx_done_old = tx_done;
clear_bit(__I40E_HANG_CHECK_ARMED, &tx_ring->state);
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (8 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 22:32 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly Catherine Sullivan
` (4 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
I found a code indent that was avoidable because a whole function is inside
an if block, reverse the if and move the code back a tab.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I9989c8750ee61678fbf96a3b0fd7bf7cc7ef300a
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 82 +++++++++++++++--------------
1 file changed, 42 insertions(+), 40 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 87ad491..2771259 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5540,49 +5540,51 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf)
if (!(pf->flags & (I40E_FLAG_FD_SB_ENABLED | I40E_FLAG_FD_ATR_ENABLED)))
return;
- if (time_after(jiffies, pf->fd_flush_timestamp +
- (I40E_MIN_FD_FLUSH_INTERVAL * HZ))) {
- /* If the flush is happening too quick and we have mostly
- * SB rules we should not re-enable ATR for some time.
- */
- min_flush_time = pf->fd_flush_timestamp
- + (I40E_MIN_FD_FLUSH_SB_ATR_UNSTABLE * HZ);
- fd_room = pf->fdir_pf_filter_count - pf->fdir_pf_active_filters;
+ if (!time_after(jiffies, pf->fd_flush_timestamp +
+ (I40E_MIN_FD_FLUSH_INTERVAL * HZ)))
+ return;
- if (!(time_after(jiffies, min_flush_time)) &&
- (fd_room < I40E_FDIR_BUFFER_HEAD_ROOM_FOR_ATR)) {
- if (I40E_DEBUG_FD & pf->hw.debug_mask)
- dev_info(&pf->pdev->dev, "ATR disabled, not enough FD filter space.\n");
- disable_atr = true;
- }
+ /* If the flush is happening too quick and we have mostly SB rules we
+ * should not re-enable ATR for some time.
+ */
+ min_flush_time = pf->fd_flush_timestamp +
+ (I40E_MIN_FD_FLUSH_SB_ATR_UNSTABLE * HZ);
+ fd_room = pf->fdir_pf_filter_count - pf->fdir_pf_active_filters;
- pf->fd_flush_timestamp = jiffies;
- pf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;
- /* flush all filters */
- wr32(&pf->hw, I40E_PFQF_CTL_1,
- I40E_PFQF_CTL_1_CLEARFDTABLE_MASK);
- i40e_flush(&pf->hw);
- pf->fd_flush_cnt++;
- pf->fd_add_err = 0;
- do {
- /* Check FD flush status every 5-6msec */
- usleep_range(5000, 6000);
- reg = rd32(&pf->hw, I40E_PFQF_CTL_1);
- if (!(reg & I40E_PFQF_CTL_1_CLEARFDTABLE_MASK))
- break;
- } while (flush_wait_retry--);
- if (reg & I40E_PFQF_CTL_1_CLEARFDTABLE_MASK) {
- dev_warn(&pf->pdev->dev, "FD table did not flush, needs more time\n");
- } else {
- /* replay sideband filters */
- i40e_fdir_filter_restore(pf->vsi[pf->lan_vsi]);
- if (!disable_atr)
- pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
- clear_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state);
- if (I40E_DEBUG_FD & pf->hw.debug_mask)
- dev_info(&pf->pdev->dev, "FD Filter table flushed and FD-SB replayed.\n");
- }
+ if (!(time_after(jiffies, min_flush_time)) &&
+ (fd_room < I40E_FDIR_BUFFER_HEAD_ROOM_FOR_ATR)) {
+ if (I40E_DEBUG_FD & pf->hw.debug_mask)
+ dev_info(&pf->pdev->dev, "ATR disabled, not enough FD filter space.\n");
+ disable_atr = true;
+ }
+
+ pf->fd_flush_timestamp = jiffies;
+ pf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;
+ /* flush all filters */
+ wr32(&pf->hw, I40E_PFQF_CTL_1,
+ I40E_PFQF_CTL_1_CLEARFDTABLE_MASK);
+ i40e_flush(&pf->hw);
+ pf->fd_flush_cnt++;
+ pf->fd_add_err = 0;
+ do {
+ /* Check FD flush status every 5-6msec */
+ usleep_range(5000, 6000);
+ reg = rd32(&pf->hw, I40E_PFQF_CTL_1);
+ if (!(reg & I40E_PFQF_CTL_1_CLEARFDTABLE_MASK))
+ break;
+ } while (flush_wait_retry--);
+ if (reg & I40E_PFQF_CTL_1_CLEARFDTABLE_MASK) {
+ dev_warn(&pf->pdev->dev, "FD table did not flush, needs more time\n");
+ } else {
+ /* replay sideband filters */
+ i40e_fdir_filter_restore(pf->vsi[pf->lan_vsi]);
+ if (!disable_atr)
+ pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
+ clear_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state);
+ if (I40E_DEBUG_FD & pf->hw.debug_mask)
+ dev_info(&pf->pdev->dev, "FD Filter table flushed and FD-SB replayed.\n");
}
+
}
/**
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (9 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-08-31 17:54 ` Jesse Brandeburg
2015-09-09 22:35 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF Catherine Sullivan
` (3 subsequent siblings)
14 siblings, 2 replies; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Mitch Williams <mitch.a.williams@intel.com>
Use the capabilities passed to us by the PF driver to control VF driver
behavior. In the process, clean up the VLAN add/remove code so it's not
a horrible morass of ifdefs.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I1050eaf12b658a26fea6813047c9964163c70a73
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 53ecc09..4eff523 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -730,6 +730,8 @@ static int i40evf_vlan_rx_add_vid(struct net_device *netdev,
{
struct i40evf_adapter *adapter = netdev_priv(netdev);
+ if (!VLAN_ALLOWED(adapter))
+ return -EIO;
if (i40evf_add_vlan(adapter, vid) == NULL)
return -ENOMEM;
return 0;
@@ -745,8 +747,11 @@ static int i40evf_vlan_rx_kill_vid(struct net_device *netdev,
{
struct i40evf_adapter *adapter = netdev_priv(netdev);
- i40evf_del_vlan(adapter, vid);
- return 0;
+ if (VLAN_ALLOWED(adapter)) {
+ i40evf_del_vlan(adapter, vid);
+ return 0;
+ }
+ return -EIO;
}
/**
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (10 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 22:43 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features Catherine Sullivan
` (2 subsequent siblings)
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Mitch Williams <mitch.a.williams@intel.com>
The VF really doesn't care about the QOS handle but it will in the
future. Since the VF only uses TC0, send it that handle. On the VF
side, save the handle and use it to populate the QOS params when we call
into the client interface.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I76f41b070baeaa09b19383e9168bc677837e0761
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 ++++--
drivers/net/ethernet/intel/i40evf/i40evf.h | 1 +
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 +
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index f42c7c1..9065d40 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1210,8 +1210,10 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
if (vf->lan_vsi_idx) {
vfres->vsi_res[i].vsi_id = vf->lan_vsi_id;
vfres->vsi_res[i].vsi_type = I40E_VSI_SRIOV;
- vfres->vsi_res[i].num_queue_pairs =
- pf->vsi[vf->lan_vsi_idx]->alloc_queue_pairs;
+ vfres->vsi_res[i].num_queue_pairs = vsi->alloc_queue_pairs;
+ /* VFs only use TC 0 */
+ vfres->vsi_res[i].qset_handle
+ = le16_to_cpu(vsi->info.qs_handle[0]);
ether_addr_copy(vfres->vsi_res[i].default_mac_addr,
vf->default_lan_addr.addr);
i++;
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index 27dc3fe..e7a223e 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -66,6 +66,7 @@ struct i40e_vsi {
*/
u16 rx_itr_setting;
u16 tx_itr_setting;
+ u16 qs_handle;
};
/* How many Rx Buffers do we bundle into one write to the hardware ? */
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 4eff523..9c19189 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2115,6 +2115,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)
adapter->vsi.tx_itr_setting = (I40E_ITR_DYNAMIC |
ITR_REG_TO_USEC(I40E_ITR_TX_DEF));
adapter->vsi.netdev = adapter->netdev;
+ adapter->vsi.qs_handle = adapter->vsi_res->qset_handle;
return 0;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (11 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF Catherine Sullivan
@ 2015-08-28 21:55 ` Catherine Sullivan
2015-09-09 23:27 ` Bowers, AndrewX
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation Catherine Sullivan
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13 Catherine Sullivan
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:55 UTC (permalink / raw)
To: intel-wired-lan
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To help users and developers know what compile options
and hardware features are enabled at compile time, print
VxLAN is available.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I3162f3b7678dc725a597f964217920eb218b480b
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2771259..469e1d5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9914,6 +9914,9 @@ static void i40e_print_features(struct i40e_pf *pf)
}
if (pf->flags & I40E_FLAG_DCB_CAPABLE)
buf += sprintf(buf, "DCB ");
+#if IS_ENABLED(CONFIG_VXLAN)
+ buf += sprintf(buf, "VxLAN ");
+#endif
if (pf->flags & I40E_FLAG_PTP)
buf += sprintf(buf, "PTP ");
#ifdef I40E_FCOE
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (12 preceding siblings ...)
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features Catherine Sullivan
@ 2015-08-28 21:56 ` Catherine Sullivan
2015-08-28 23:03 ` Jesse Gross
2015-09-10 16:15 ` Bowers, AndrewX
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13 Catherine Sullivan
14 siblings, 2 replies; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:56 UTC (permalink / raw)
To: intel-wired-lan
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
The i40e driver will soon be capable of offloading GRE traffic
but in the meantime, don't let the driver tell the OS that
it can offload types of traffic it cannot.
This fixes a bug where if you stack a GRE MAC in IP tunnel
over i40e, all TSO packets will be sent with invalid checksums
causing really bad throughput.
NOTE: I still see some retransmits that are unexplained when
testing with vxlan or ip/mac tunnels (GRE) but the throughput
is more like what is expected with multi-gigabit on a single
flow.
Reported-by: Stefan Assman <sassman@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: Ie31843b150695b2b1889e306b8c33c1d2da29a9e
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 36 ++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 469e1d5..b686450 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -30,6 +30,7 @@
#if defined(CONFIG_VXLAN) || defined(CONFIG_VXLAN_MODULE)
#include <net/vxlan.h>
#endif
+#include <net/gre.h>
const char i40e_driver_name[] = "i40e";
static const char i40e_driver_string[] =
@@ -8372,12 +8373,41 @@ static netdev_features_t i40e_features_check(struct sk_buff *skb,
struct net_device *dev,
netdev_features_t features)
{
- if (skb->encapsulation &&
- (skb_inner_mac_header(skb) - skb_transport_header(skb) >
- I40E_MAX_TUNNEL_HDR_LEN))
+ u8 protocol = 0;
+ int hlen;
+
+ if (!skb->encapsulation)
+ return features;
+
+ /* prevent tunnel headers that are too long to offload from
+ * being sent to the hardware
+ */
+ if (skb_inner_mac_header(skb) - skb_transport_header(skb) >
+ I40E_MAX_TUNNEL_HDR_LEN)
+ return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
+
+ switch (vlan_get_protocol(skb)) {
+ case htons(ETH_P_IP):
+ protocol = ip_hdr(skb)->protocol;
+ break;
+ case htons(ETH_P_IPV6):
+ protocol = ipv6_hdr(skb)->nexthdr;
+ break;
+ }
+
+ hlen = skb_inner_mac_header(skb) - skb_transport_header(skb);
+ if ((protocol == IPPROTO_GRE) &&
+ (skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
+ skb->inner_protocol != htons(ETH_P_TEB) ||
+ hlen < sizeof(struct gre_base_hdr) ||
+ hlen > (sizeof(struct gre_base_hdr) + 12)))
return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
+#if IS_ENABLED(CONFIG_VXLAN)
+ return vxlan_features_check(skb, features);
+#else
return features;
+#endif
}
static const struct net_device_ops i40e_netdev_ops = {
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
` (13 preceding siblings ...)
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation Catherine Sullivan
@ 2015-08-28 21:56 ` Catherine Sullivan
2015-09-10 16:34 ` Bowers, AndrewX
14 siblings, 1 reply; 40+ messages in thread
From: Catherine Sullivan @ 2015-08-28 21:56 UTC (permalink / raw)
To: intel-wired-lan
Bump.
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Change-ID: If7ce84218361defa209142d1d8c6f69d48c2d7ad
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b686450..4e497a7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -40,7 +40,7 @@ static const char i40e_driver_string[] =
#define DRV_VERSION_MAJOR 1
#define DRV_VERSION_MINOR 3
-#define DRV_VERSION_BUILD 18
+#define DRV_VERSION_BUILD 21
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
__stringify(DRV_VERSION_MINOR) "." \
__stringify(DRV_VERSION_BUILD) DRV_KERN
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 9c19189..c00e495 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -34,7 +34,7 @@ char i40evf_driver_name[] = "i40evf";
static const char i40evf_driver_string[] =
"Intel(R) XL710/X710 Virtual Function Network Driver";
-#define DRV_VERSION "1.3.10"
+#define DRV_VERSION "1.3.13"
const char i40evf_driver_version[] = DRV_VERSION;
static const char i40evf_copyright[] =
"Copyright (c) 2013 - 2015 Intel Corporation.";
--
1.9.3
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation Catherine Sullivan
@ 2015-08-28 23:03 ` Jesse Gross
[not found] ` <E8A77B2FB54C194393A5C2A8E3ED1678266F3BA6@CRSMSX102.amr.corp.intel.com>
2015-09-10 16:15 ` Bowers, AndrewX
1 sibling, 1 reply; 40+ messages in thread
From: Jesse Gross @ 2015-08-28 23:03 UTC (permalink / raw)
To: intel-wired-lan
On Fri, Aug 28, 2015 at 2:56 PM, Catherine Sullivan
<catherine.sullivan@intel.com> wrote:
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 469e1d5..b686450 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
[...]
> +#if IS_ENABLED(CONFIG_VXLAN)
> + return vxlan_features_check(skb, features);
> +#else
> return features;
> +#endif
I don't think this is right - when VXLAN is compiled in, it will
restrict offload capabilities to that of VXLAN. But when there is no
VXLAN support, all tunnel types will be allowed. Presumably, there is
some underlying hardware capability here for both situations (and
maybe even for GRE as well).
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly Catherine Sullivan
@ 2015-08-31 17:54 ` Jesse Brandeburg
2015-09-09 22:35 ` Bowers, AndrewX
1 sibling, 0 replies; 40+ messages in thread
From: Jesse Brandeburg @ 2015-08-31 17:54 UTC (permalink / raw)
To: intel-wired-lan
On Fri, 28 Aug 2015 17:55:57 -0400
Catherine Sullivan <catherine.sullivan@intel.com> wrote:
> From: Mitch Williams <mitch.a.williams@intel.com>
>
> Use the capabilities passed to us by the PF driver to control VF driver
> behavior. In the process, clean up the VLAN add/remove code so it's not
> a horrible morass of ifdefs.
In this case I think the description should read:
Use the capabilities passed to us by the PF driver to control VF driver
behavior.
And drop the second sentence as it doesn't make sense.
>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I1050eaf12b658a26fea6813047c9964163c70a73
> ---
> drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> index 53ecc09..4eff523 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> @@ -730,6 +730,8 @@ static int i40evf_vlan_rx_add_vid(struct net_device *netdev,
> {
> struct i40evf_adapter *adapter = netdev_priv(netdev);
>
> + if (!VLAN_ALLOWED(adapter))
> + return -EIO;
> if (i40evf_add_vlan(adapter, vid) == NULL)
> return -ENOMEM;
> return 0;
> @@ -745,8 +747,11 @@ static int i40evf_vlan_rx_kill_vid(struct net_device *netdev,
> {
> struct i40evf_adapter *adapter = netdev_priv(netdev);
>
> - i40evf_del_vlan(adapter, vid);
> - return 0;
> + if (VLAN_ALLOWED(adapter)) {
> + i40evf_del_vlan(adapter, vid);
> + return 0;
> + }
> + return -EIO;
> }
>
> /**
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate Catherine Sullivan
@ 2015-09-09 21:30 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 21:30 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus
> command for nvmupdate
>
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> This adds a new GetStatus command so that the NVM update tool can query
> the current status instead of doing fake write requests to probe for
> readiness.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: I671ec6ccd4dfc9dbac3a03b964589d693fda5cd8
> ---
> drivers/net/ethernet/intel/i40e/i40e_nvm.c | 42
> ++++++++++++++++++++-------
> drivers/net/ethernet/intel/i40e/i40e_type.h | 2 ++
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 2 ++
> 3 files changed, 35 insertions(+), 11 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine Catherine Sullivan
@ 2015-09-09 21:40 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 21:40 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states
> to NVM state machine
>
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> This adds wait states to the NVM update state machine to signify when
> waiting for an update operation to finish, whether we're in the middle of a
> set of Write operations, or we're now idle but waiting.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: Iabe91d6579ef6a2ea560647e374035656211ab43
> ---
> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 13 ++++++++
> drivers/net/ethernet/intel/i40e/i40e_nvm.c | 48
> ++++++++++++++++++++-------
> drivers/net/ethernet/intel/i40e/i40e_type.h | 4 ++-
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 4 ++-
> 4 files changed, 55 insertions(+), 14 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility Catherine Sullivan
@ 2015-09-09 21:46 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 21:46 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq
> command to nvmupdate utility
>
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> Add a facility to run AQ commands through the nvmupdate utility in order to
> allow the update tools to interact with the FW and do special commands
> needed for updates and configuration changes.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: I5c41523e4055b37f8e4ee479f7a0574368f4a588
> ---
> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 3 +
> drivers/net/ethernet/intel/i40e/i40e_nvm.c | 83
> +++++++++++++++++++++++++
> drivers/net/ethernet/intel/i40e/i40e_type.h | 2 +
> drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 3 +
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 2 +
> 5 files changed, 93 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result command to nvmupdate utility
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result " Catherine Sullivan
@ 2015-09-09 21:50 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 21:50 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ
> result command to nvmupdate utility
>
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> Add a facility to recover the result of a previously run AQ command.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: I21afec2c20c1a5e6ba60c7fbfcbedfff78c10e45
> ---
> drivers/net/ethernet/intel/i40e/i40e_nvm.c | 79
> +++++++++++++++++++++++++++
> drivers/net/ethernet/intel/i40e/i40e_type.h | 1 +
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 +
> 3 files changed, 81 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap Catherine Sullivan
@ 2015-09-09 21:52 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 21:52 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Bowers, Gregory J
> Subject: [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB
> UP to TC map nibble swap
>
> From: Greg Bowers <gregory.j.bowers@intel.com>
>
> Changes parsing of AQ command Get CEE DCBX OPER CFG (0x0A07). Change
> is required because FW creates the oper_prio_tc nibbles reversed from
> those in the CEE Priority Group sub-TLV.
>
> Signed-off-by: Greg Bowers <gregory.j.bowers@intel.com>
> Change-ID: I7d9d8641bb430d30e286fc3fac909866ef8a0de8
> ---
> drivers/net/ethernet/intel/i40e/i40e_dcb.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code Catherine Sullivan
@ 2015-09-09 22:28 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 22:28 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some
> code
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> Add missings spaces after declarations, remove another __func__ use,
> remove uncessary braces, remove unneeded breaks, and useless returns,
> and generally fix up some code.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: Ie715d6b64976c50e1c21531685fe0a2bd38c4244
> ---
> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_common.c | 9 +-
> drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 1 +
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 124 ++++++++++++-----
> ----
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 -
> drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_main.c | 39 ++++---
> drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 +
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 ++-
> drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 3 +-
> drivers/net/ethernet/intel/i40evf/i40e_common.c | 8 +-
> drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 +-
> drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 1 +
> drivers/net/ethernet/intel/i40evf/i40evf.h | 4 -
> 17 files changed, 125 insertions(+), 103 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang Catherine Sullivan
@ 2015-09-09 22:30 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 22:30 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang
>
> We were missing an else so add it back in.
>
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> ---
> drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 ++
> 1 file changed, 2 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent Catherine Sullivan
@ 2015-09-09 22:32 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 22:32 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to
> remove indent
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> I found a code indent that was avoidable because a whole function is inside
> an if block, reverse the if and move the code back a tab.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: I9989c8750ee61678fbf96a3b0fd7bf7cc7ef300a
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 82 +++++++++++++++--------
> ------
> 1 file changed, 42 insertions(+), 40 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly Catherine Sullivan
2015-08-31 17:54 ` Jesse Brandeburg
@ 2015-09-09 22:35 ` Bowers, AndrewX
1 sibling, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 22:35 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags
> properly
>
> From: Mitch Williams <mitch.a.williams@intel.com>
>
> Use the capabilities passed to us by the PF driver to control VF driver
> behavior. In the process, clean up the VLAN add/remove code so it's not a
> horrible morass of ifdefs.
>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I1050eaf12b658a26fea6813047c9964163c70a73
> ---
> drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF Catherine Sullivan
@ 2015-09-09 22:43 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 22:43 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS
> handle to VF
>
> From: Mitch Williams <mitch.a.williams@intel.com>
>
> The VF really doesn't care about the QOS handle but it will in the future.
> Since the VF only uses TC0, send it that handle. On the VF side, save the
> handle and use it to populate the QOS params when we call into the client
> interface.
>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I76f41b070baeaa09b19383e9168bc677837e0761
> ---
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 ++++--
> drivers/net/ethernet/intel/i40evf/i40evf.h | 1 +
> drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 +
> 3 files changed, 6 insertions(+), 2 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features Catherine Sullivan
@ 2015-09-09 23:27 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-09 23:27 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new
> features
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> To help users and developers know what compile options and hardware
> features are enabled at compile time, print VxLAN is available.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-ID: I3162f3b7678dc725a597f964217920eb218b480b
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++
> 1 file changed, 3 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree, VxLAN printed at init with VxLAN enabled at compile time
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
[not found] ` <E8A77B2FB54C194393A5C2A8E3ED1678266F3BA6@CRSMSX102.amr.corp.intel.com>
@ 2015-09-09 23:32 ` Nelson, Shannon
2015-09-10 0:52 ` Jesse Gross
0 siblings, 1 reply; 40+ messages in thread
From: Nelson, Shannon @ 2015-09-09 23:32 UTC (permalink / raw)
To: intel-wired-lan
> > From: Jesse Gross [mailto:jesse at nicira.com]
> > Sent: Friday, August 28, 2015 4:03 PM
> > To: Sullivan, Catherine
> > Cc: intel-wired-lan
> > Subject: Re: [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip
> GRE
> > encapulation
Hi Jesse, thanks for looking at these. Please excuse this late response and possibly mangled headers, I just got back from sabbatical and am looking at old mail...
> >
> > On Fri, Aug 28, 2015 at 2:56 PM, Catherine Sullivan
> > <catherine.sullivan@intel.com> wrote:
> > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > index 469e1d5..b686450 100644
> > > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > [...]
> > > +#if IS_ENABLED(CONFIG_VXLAN)
> > > + return vxlan_features_check(skb, features); #else
> > > return features;
> > > +#endif
> >
> > I don't think this is right - when VXLAN is compiled in, it will
> restrict offload
> > capabilities to that of VXLAN. But when there is no VXLAN support, all
> tunnel
> > types will be allowed. Presumably, there is some underlying hardware
> > capability here for both situations (and maybe even for GRE as well).
I don't understand where you this restriction. Looking at the code in vxlan_features_check(), it looks to me that the features bits are mangled only if IPPROTO_UDP is set AND the other header parameters don't match VXLAN needs. If there is no encapsulation, or it is something other than IPPROTO_UDP (e.g. IPPROTO_GRE), then there is no change to the features bits.
If you are referring to other tunneling protocols that might call themselves IPROTO_UDP, then I would think there is a problem in the implementation of vxlan_features_check(), not in how we call it. In that case, vxlan_features_check() should be looking at some additional flag to assure VXLAN before verifying the other header parameters.
What am I missing? Are you thinking that our calling code should look for some additional VXLAN flag before calling vxlan_features_check()?
Thanks,
sln
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-09-09 23:32 ` Nelson, Shannon
@ 2015-09-10 0:52 ` Jesse Gross
2015-09-10 4:54 ` Nelson, Shannon
0 siblings, 1 reply; 40+ messages in thread
From: Jesse Gross @ 2015-09-10 0:52 UTC (permalink / raw)
To: intel-wired-lan
On Wed, Sep 9, 2015 at 4:32 PM, Nelson, Shannon
<shannon.nelson@intel.com> wrote:
>> > From: Jesse Gross [mailto:jesse at nicira.com]
>> > On Fri, Aug 28, 2015 at 2:56 PM, Catherine Sullivan
>> > <catherine.sullivan@intel.com> wrote:
>> > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> > > b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> > > index 469e1d5..b686450 100644
>> > > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> > > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> > [...]
>> > > +#if IS_ENABLED(CONFIG_VXLAN)
>> > > + return vxlan_features_check(skb, features); #else
>> > > return features;
>> > > +#endif
>> >
>> > I don't think this is right - when VXLAN is compiled in, it will
>> restrict offload
>> > capabilities to that of VXLAN. But when there is no VXLAN support, all
>> tunnel
>> > types will be allowed. Presumably, there is some underlying hardware
>> > capability here for both situations (and maybe even for GRE as well).
>
> I don't understand where you this restriction. Looking at the code in vxlan_features_check(), it looks to me that the features bits are mangled only if IPPROTO_UDP is set AND the other header parameters don't match VXLAN needs. If there is no encapsulation, or it is something other than IPPROTO_UDP (e.g. IPPROTO_GRE), then there is no change to the features bits.
>
> If you are referring to other tunneling protocols that might call themselves IPROTO_UDP, then I would think there is a problem in the implementation of vxlan_features_check(), not in how we call it. In that case, vxlan_features_check() should be looking at some additional flag to assure VXLAN before verifying the other header parameters.
>
> What am I missing? Are you thinking that our calling code should look for some additional VXLAN flag before calling vxlan_features_check()?
VXLAN is not the only UDP based encapsulation, so there are other
protocols that call themselves that. (I'm not quite sure what you mean
by this, it seems to imply that these protocols are somehow spoofing
something. They're not - they and VXLAN are all layered under UDP).
However, I don't think that's really the issue.
The point that I was trying to make is that there is an underlying
hardware capability as far as the types of protocols that are
understood, lengths of headers, etc. and the goal of this function is
to remove any offload features that can't be supported so the core
stack doesn't use them. vxlan_features_check() will do this by
chopping down the general NETIF_F_GSO_UDP_TUNNEL feature to only allow
headers that look like VXLAN. However, if VXLAN is not compiled in,
then with this patch that restriction won't take place and the driver
will actually receive packets with more offloads than it otherwise
would. These can come from other UDP protocols which can still be
enabled even if VXLAN is not. In this case, these protocols will
break.
That being said, I also happen to know that the underlying hardware is
capable of supporting more than just VXLAN. In particular, it supports
Geneve, which is also a UDP based protocol. Using
vxlan_features_check() here will remove offload support for at least
some types of Geneve packets, so this is a little heavy handed.
To make a long story short, it looks like the actual problem here is
that only UDP tunnels are supported (since that is all that is checked
in i40e_tx_enable_csum()). In that case, I think you could simply do:
if ((protocol != IPPROTO_UDP))
return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
And that would solve the above concerns as well as catch some
additional problematic cases.
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-09-10 0:52 ` Jesse Gross
@ 2015-09-10 4:54 ` Nelson, Shannon
2015-09-10 6:01 ` Jesse Gross
0 siblings, 1 reply; 40+ messages in thread
From: Nelson, Shannon @ 2015-09-10 4:54 UTC (permalink / raw)
To: intel-wired-lan
> From: Jesse Gross [mailto:jesse at nicira.com]
> Sent: Wednesday, September 09, 2015 5:52 PM
[...]
>
> On Wed, Sep 9, 2015 at 4:32 PM, Nelson, Shannon
> <shannon.nelson@intel.com> wrote:
> >> > From: Jesse Gross [mailto:jesse at nicira.com]
> >> > On Fri, Aug 28, 2015 at 2:56 PM, Catherine Sullivan
> >> > <catherine.sullivan@intel.com> wrote:
> >> > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> > > b/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> > > index 469e1d5..b686450 100644
> >> > > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> > > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> > [...]
> >> > > +#if IS_ENABLED(CONFIG_VXLAN)
> >> > > + return vxlan_features_check(skb, features); #else
> >> > > return features;
> >> > > +#endif
> >> >
> >> > I don't think this is right - when VXLAN is compiled in, it will
> >> restrict offload
> >> > capabilities to that of VXLAN. But when there is no VXLAN support,
> all
> >> tunnel
> >> > types will be allowed. Presumably, there is some underlying
> hardware
> >> > capability here for both situations (and maybe even for GRE as
> well).
> >
> > I don't understand where you this restriction. Looking at the code in
> vxlan_features_check(), it looks to me that the features bits are
> mangled only if IPPROTO_UDP is set AND the other header parameters don't
> match VXLAN needs. If there is no encapsulation, or it is something
> other than IPPROTO_UDP (e.g. IPPROTO_GRE), then there is no change to
> the features bits.
> >
> > If you are referring to other tunneling protocols that might call
> themselves IPROTO_UDP, then I would think there is a problem in the
> implementation of vxlan_features_check(), not in how we call it. In
> that case, vxlan_features_check() should be looking at some additional
> flag to assure VXLAN before verifying the other header parameters.
> >
> > What am I missing? Are you thinking that our calling code should look
> for some additional VXLAN flag before calling vxlan_features_check()?
>
> VXLAN is not the only UDP based encapsulation, so there are other
> protocols that call themselves that. (I'm not quite sure what you mean
> by this, it seems to imply that these protocols are somehow spoofing
> something. They're not - they and VXLAN are all layered under UDP).
> However, I don't think that's really the issue.
[...]
Okay, so we are on the same page, just different paragraphs...
> That being said, I also happen to know that the underlying hardware is
> capable of supporting more than just VXLAN. In particular, it supports
> Geneve, which is also a UDP based protocol. Using
> vxlan_features_check() here will remove offload support for at least
> some types of Geneve packets, so this is a little heavy handed.
It becomes an issue if you rely on vxlan_features_check(), as we are currently doing, to filter the IPPROTO_UDP. Yes, there are other UDP encapsulations, we're just not implementing them quite yet... tho' I believe you've already seen the newer Geneve patches that were just posted. This patch is from before that.
> To make a long story short, it looks like the actual problem here is
> that only UDP tunnels are supported (since that is all that is checked
> in i40e_tx_enable_csum()). In that case, I think you could simply do:
>
> if ((protocol != IPPROTO_UDP))
> return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
The GRE encapsulation uses a different IPPROTO_xxx value, which is what we're dealing with in this particular patch, so we're checking that in our own function, then using the kernel's vxlan check the IPPROTO_UDP encapsulation. Yes, this is heavy handed, and as we expand the tunnels to be supported (E>G> Geneve), we're going to need to discern each encapsulation and check them individually.
I'd like to suggest that we use this patch as is, and continue refining the driver's feature checks as we add support for more encapsulations.
In the future, as these encapsulations become supported by more devices and drivers, and the checks are coded and debugged, we'll want to move these checks into the kernel stack for all to use, along with the vxlan check.
sln
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-09-10 4:54 ` Nelson, Shannon
@ 2015-09-10 6:01 ` Jesse Gross
2015-09-10 21:53 ` Nelson, Shannon
0 siblings, 1 reply; 40+ messages in thread
From: Jesse Gross @ 2015-09-10 6:01 UTC (permalink / raw)
To: intel-wired-lan
On Wed, Sep 9, 2015 at 9:54 PM, Nelson, Shannon
<shannon.nelson@intel.com> wrote:
>> From: Jesse Gross [mailto:jesse at nicira.com]
>> Sent: Wednesday, September 09, 2015 5:52 PM
> [...]
>>
>> On Wed, Sep 9, 2015 at 4:32 PM, Nelson, Shannon
>> <shannon.nelson@intel.com> wrote:
>> >> > From: Jesse Gross [mailto:jesse at nicira.com]
>> >> > On Fri, Aug 28, 2015 at 2:56 PM, Catherine Sullivan
>> >> > <catherine.sullivan@intel.com> wrote:
>> >> > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> >> > > b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> >> > > index 469e1d5..b686450 100644
>> >> > > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> >> > > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> >> > [...]
>> >> > > +#if IS_ENABLED(CONFIG_VXLAN)
>> >> > > + return vxlan_features_check(skb, features); #else
>> >> > > return features;
>> >> > > +#endif
>> >> >
>> >> > I don't think this is right - when VXLAN is compiled in, it will
>> >> restrict offload
>> >> > capabilities to that of VXLAN. But when there is no VXLAN support,
>> all
>> >> tunnel
>> >> > types will be allowed. Presumably, there is some underlying
>> hardware
>> >> > capability here for both situations (and maybe even for GRE as
>> well).
>> >
>> > I don't understand where you this restriction. Looking at the code in
>> vxlan_features_check(), it looks to me that the features bits are
>> mangled only if IPPROTO_UDP is set AND the other header parameters don't
>> match VXLAN needs. If there is no encapsulation, or it is something
>> other than IPPROTO_UDP (e.g. IPPROTO_GRE), then there is no change to
>> the features bits.
>> >
>> > If you are referring to other tunneling protocols that might call
>> themselves IPROTO_UDP, then I would think there is a problem in the
>> implementation of vxlan_features_check(), not in how we call it. In
>> that case, vxlan_features_check() should be looking at some additional
>> flag to assure VXLAN before verifying the other header parameters.
>> >
>> > What am I missing? Are you thinking that our calling code should look
>> for some additional VXLAN flag before calling vxlan_features_check()?
>>
>> VXLAN is not the only UDP based encapsulation, so there are other
>> protocols that call themselves that. (I'm not quite sure what you mean
>> by this, it seems to imply that these protocols are somehow spoofing
>> something. They're not - they and VXLAN are all layered under UDP).
>> However, I don't think that's really the issue.
>
> [...]
>
> Okay, so we are on the same page, just different paragraphs...
>
>> That being said, I also happen to know that the underlying hardware is
>> capable of supporting more than just VXLAN. In particular, it supports
>> Geneve, which is also a UDP based protocol. Using
>> vxlan_features_check() here will remove offload support for at least
>> some types of Geneve packets, so this is a little heavy handed.
>
> It becomes an issue if you rely on vxlan_features_check(), as we are currently doing, to filter the IPPROTO_UDP. Yes, there are other UDP encapsulations, we're just not implementing them quite yet... tho' I believe you've already seen the newer Geneve patches that were just posted. This patch is from before that.
I understand that but I believe those are only on the receive side and
I don't think there is any overlap here.
>> To make a long story short, it looks like the actual problem here is
>> that only UDP tunnels are supported (since that is all that is checked
>> in i40e_tx_enable_csum()). In that case, I think you could simply do:
>>
>> if ((protocol != IPPROTO_UDP))
>> return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
>
> The GRE encapsulation uses a different IPPROTO_xxx value, which is what we're dealing with in this particular patch, so we're checking that in our own function, then using the kernel's vxlan check the IPPROTO_UDP encapsulation. Yes, this is heavy handed, and as we expand the tunnels to be supported (E>G> Geneve), we're going to need to discern each encapsulation and check them individually.
>
> I'd like to suggest that we use this patch as is, and continue refining the driver's feature checks as we add support for more encapsulations.
Unfortunately, I don't think that is a good idea as this patch
introduces bugs. The stack already implements these other protocols
and by not supporting them here that means there are no restrictions
on them. For example, it seems that Ethernet over GRE, IPIP, or Geneve
when VXLAN is not compiled in will all go out with checksum errors.
Even if you don't want to support offloads yet, you can't just send
the packets with errors.
Since the actual restriction in the driver is that non-UDP protocols
are not offloaded, I believe that the code that I suggested is the
only way to avoid dropping packets.
> In the future, as these encapsulations become supported by more devices and drivers, and the checks are coded and debugged, we'll want to move these checks into the kernel stack for all to use, along with the vxlan check.
To be honest, there is no way that is going to happen. The goal of the
core network stack is to be as generic as possible and the push is
going to be to have the drivers be more general rather than the core
kernel have more specific protocol knowledge.
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation Catherine Sullivan
2015-08-28 23:03 ` Jesse Gross
@ 2015-09-10 16:15 ` Bowers, AndrewX
2015-09-10 16:56 ` Sullivan, Catherine
1 sibling, 1 reply; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-10 16:15 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE
> encapulation
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> The i40e driver will soon be capable of offloading GRE traffic but in the
> meantime, don't let the driver tell the OS that it can offload types of traffic it
> cannot.
>
> This fixes a bug where if you stack a GRE MAC in IP tunnel over i40e, all TSO
> packets will be sent with invalid checksums causing really bad throughput.
>
> NOTE: I still see some retransmits that are unexplained when testing with
> vxlan or ip/mac tunnels (GRE) but the throughput is more like what is
> expected with multi-gigabit on a single flow.
>
> Reported-by: Stefan Assman <sassman@redhat.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: Ie31843b150695b2b1889e306b8c33c1d2da29a9e
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 36
> ++++++++++++++++++++++++++---
> 1 file changed, 33 insertions(+), 3 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree, patch breaks build of kernel. Builds normally with patch reverted. Error received is "drivers/net/ethernet/intel/i40e/i40e_main.c:8351:2: error: implicit declaration of function 'vxlan_features_check' [-Werror=implicit-function-declaration]"make
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13 Catherine Sullivan
@ 2015-09-10 16:34 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-10 16:34 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to
> 1.3.2l and i40evf to 1.3.13
>
> Bump.
>
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-ID: If7ce84218361defa209142d1d8c6f69d48c2d7ad
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
> drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree, superseded by subsequent version bump to 1.3.25 and 1.3.17
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-09-10 16:15 ` Bowers, AndrewX
@ 2015-09-10 16:56 ` Sullivan, Catherine
0 siblings, 0 replies; 40+ messages in thread
From: Sullivan, Catherine @ 2015-09-10 16:56 UTC (permalink / raw)
To: intel-wired-lan
Jeff, please drop this patch for now. We will re-work it and send it in a future series.
Thanks,
Catherine
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-09-10 6:01 ` Jesse Gross
@ 2015-09-10 21:53 ` Nelson, Shannon
2015-09-11 2:12 ` Jesse Gross
0 siblings, 1 reply; 40+ messages in thread
From: Nelson, Shannon @ 2015-09-10 21:53 UTC (permalink / raw)
To: intel-wired-lan
> From: Jesse Gross [mailto:jesse at nicira.com]
> Sent: Wednesday, September 09, 2015 11:02 PM
>
Thanks, Jesse, for your perseverance.
> >> To make a long story short, it looks like the actual problem here is
> >> that only UDP tunnels are supported (since that is all that is
> checked
> >> in i40e_tx_enable_csum()). In that case, I think you could simply do:
> >>
> >> if ((protocol != IPPROTO_UDP))
> >> return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
Ah, now I see that the GRE support patch for i40e_tx_enable_csum() hasn't been pushed out yet. This explains some of this discussion. Okay - for the moment we're dropping this patch, to be reworked when the other patch gets pushed.
I think you're right about simply dropping the use of vxlan_features_check() as it is too specific for our needs. This will be part of the rework.
sln
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation
2015-09-10 21:53 ` Nelson, Shannon
@ 2015-09-11 2:12 ` Jesse Gross
0 siblings, 0 replies; 40+ messages in thread
From: Jesse Gross @ 2015-09-11 2:12 UTC (permalink / raw)
To: intel-wired-lan
On Thu, Sep 10, 2015 at 2:53 PM, Nelson, Shannon
<shannon.nelson@intel.com> wrote:
>> From: Jesse Gross [mailto:jesse at nicira.com]
>> Sent: Wednesday, September 09, 2015 11:02 PM
>>
>
> Thanks, Jesse, for your perseverance.
>
>> >> To make a long story short, it looks like the actual problem here is
>> >> that only UDP tunnels are supported (since that is all that is
>> checked
>> >> in i40e_tx_enable_csum()). In that case, I think you could simply do:
>> >>
>> >> if ((protocol != IPPROTO_UDP))
>> >> return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
>
> Ah, now I see that the GRE support patch for i40e_tx_enable_csum() hasn't been pushed out yet. This explains some of this discussion. Okay - for the moment we're dropping this patch, to be reworked when the other patch gets pushed.
>
> I think you're right about simply dropping the use of vxlan_features_check() as it is too specific for our needs. This will be part of the rework.
Thanks a lot for taking a look at it. Not trying to be a pain here - I
just want to make sure things work for all protocols/users.
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably Catherine Sullivan
@ 2015-09-16 17:46 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-16 17:46 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more
> reliably
>
> From: Mitch Williams <mitch.a.williams@intel.com>
>
> Using VFGEN_RSTAT to detect a VF reset is an endeavor that is fraught with
> peril. It's entirely too easy to miss a reset because none of the bits are sticky.
> By the time the VF driver reads the register, the reset may have been
> processed and cleaned up by the PF driver, leaving the register in the same
> state that it was before the reset.
>
> Instead, detect a reset with the VF_ARQLEN register. When the VF is reset,
> the enable bit in this register is cleared, and it stays cleared until the VF driver
> processes the reset and re-enables the admin queue.
>
> Because we now deal with multiple registers in the reset and watchdog
> tasks, rename the rstat_val variable to reg_val.
>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Id1df17045c0992e607da0162d31807f7fc20d199
> ---
> drivers/net/ethernet/intel/i40evf/i40evf_main.c | 36 +++++++++++----------
> ----
> 1 file changed, 16 insertions(+), 20 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree.
^ permalink raw reply [flat|nested] 40+ messages in thread
* [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor Catherine Sullivan
@ 2015-09-16 17:47 ` Bowers, AndrewX
0 siblings, 0 replies; 40+ messages in thread
From: Bowers, AndrewX @ 2015-09-16 17:47 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Friday, August 28, 2015 2:56 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling
> of writeback descriptor
>
> From: Shannon Nelson <shannon.nelson@intel.com>
>
> If the writeback descriptor buffer was previously created, this gives it to the
> AQ command request to be used to save the results.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Change-ID: I8c8a1af81e6ebed6d0a15ed31697fe1a6c4e3708
> ---
> drivers/net/ethernet/intel/i40e/i40e_nvm.c | 26
> ++++++++++++++++++++++----
> drivers/net/ethernet/intel/i40e/i40e_type.h | 1 +
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 +
> 3 files changed, 24 insertions(+), 4 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Code changes present in tree, admin queue data written and read correctly.
^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2015-09-16 17:47 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor Catherine Sullivan
2015-09-16 17:47 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate Catherine Sullivan
2015-09-09 21:30 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine Catherine Sullivan
2015-09-09 21:40 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility Catherine Sullivan
2015-09-09 21:46 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result " Catherine Sullivan
2015-09-09 21:50 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap Catherine Sullivan
2015-09-09 21:52 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably Catherine Sullivan
2015-09-16 17:46 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code Catherine Sullivan
2015-09-09 22:28 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang Catherine Sullivan
2015-09-09 22:30 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent Catherine Sullivan
2015-09-09 22:32 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly Catherine Sullivan
2015-08-31 17:54 ` Jesse Brandeburg
2015-09-09 22:35 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF Catherine Sullivan
2015-09-09 22:43 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features Catherine Sullivan
2015-09-09 23:27 ` Bowers, AndrewX
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation Catherine Sullivan
2015-08-28 23:03 ` Jesse Gross
[not found] ` <E8A77B2FB54C194393A5C2A8E3ED1678266F3BA6@CRSMSX102.amr.corp.intel.com>
2015-09-09 23:32 ` Nelson, Shannon
2015-09-10 0:52 ` Jesse Gross
2015-09-10 4:54 ` Nelson, Shannon
2015-09-10 6:01 ` Jesse Gross
2015-09-10 21:53 ` Nelson, Shannon
2015-09-11 2:12 ` Jesse Gross
2015-09-10 16:15 ` Bowers, AndrewX
2015-09-10 16:56 ` Sullivan, Catherine
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13 Catherine Sullivan
2015-09-10 16:34 ` Bowers, AndrewX
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.