summaryrefslogtreecommitdiff
path: root/drivers/net/i40e
diff options
context:
space:
mode:
authorQi Zhang <qi.z.zhang@intel.com>2018-09-25 10:34:41 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:48 +0200
commit5cea601bff11ae3830f18bf99ee474739d0e2850 (patch)
treec7680f19bf806955d70ccd8f2aeda3e8c6d04672 /drivers/net/i40e
parenta3aed72d40d055a53c4b9722885a9a4c8b922a1f (diff)
downloaddpdk-next-eventdev-5cea601bff11ae3830f18bf99ee474739d0e2850.zip
dpdk-next-eventdev-5cea601bff11ae3830f18bf99ee474739d0e2850.tar.gz
dpdk-next-eventdev-5cea601bff11ae3830f18bf99ee474739d0e2850.tar.xz
net/i40e/base: add new TR bits used for cloud filters
There is a new set of TR bits that can be used when replacing the cloud filters so add them in. Also added a check to make sure that the replace cloud filters AQ command doesn't get executed on an X722 since it is not supported there. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
Diffstat (limited to 'drivers/net/i40e')
-rw-r--r--drivers/net/i40e/base/i40e_adminq_cmd.h3
-rw-r--r--drivers/net/i40e/base/i40e_common.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 6ff46e3..8306260 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1554,7 +1554,8 @@ struct i40e_aqc_replace_cloud_filters_cmd {
u8 old_filter_type;
u8 new_filter_type;
u8 tr_bit;
- u8 reserved[4];
+ u8 tr_bit2;
+ u8 reserved[3];
__le32 addr_high;
__le32 addr_low;
};
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 3516084..8a98aff 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -5990,6 +5990,14 @@ i40e_status_code i40e_aq_replace_cloud_filters(struct i40e_hw *hw,
enum i40e_status_code status = I40E_SUCCESS;
int i = 0;
+ /* X722 doesn't support this command */
+ if (hw->mac.type == I40E_MAC_X722)
+ return I40E_ERR_DEVICE_NOT_SUPPORTED;
+
+ /* need FW version greater than 6.00 */
+ if (hw->aq.fw_maj_ver < 6)
+ return I40E_NOT_SUPPORTED;
+
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_replace_cloud_filters);
@@ -5999,6 +6007,7 @@ i40e_status_code i40e_aq_replace_cloud_filters(struct i40e_hw *hw,
cmd->new_filter_type = filters->new_filter_type;
cmd->valid_flags = filters->valid_flags;
cmd->tr_bit = filters->tr_bit;
+ cmd->tr_bit2 = filters->tr_bit2;
status = i40e_asq_send_command(hw, &desc, cmd_buf,
sizeof(struct i40e_aqc_replace_cloud_filters_cmd_buf), NULL);