Add parsing and reporting of iSCSI capability for a given device
or function.

Signed-off-by: Helin Zhang <helin.zhang at intel.com>
---
 lib/librte_pmd_i40e/i40e/i40e_common.c | 5 +++++
 lib/librte_pmd_i40e/i40e/i40e_type.h   | 1 +
 2 files changed, 6 insertions(+)

diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c 
b/lib/librte_pmd_i40e/i40e/i40e_common.c
index e8dce8a..4881403 100644
--- a/lib/librte_pmd_i40e/i40e/i40e_common.c
+++ b/lib/librte_pmd_i40e/i40e/i40e_common.c
@@ -2805,6 +2805,7 @@ i40e_aq_erase_nvm_exit:
 #define I40E_DEV_FUNC_CAP_VSI          0x17
 #define I40E_DEV_FUNC_CAP_DCB          0x18
 #define I40E_DEV_FUNC_CAP_FCOE         0x21
+#define I40E_DEV_FUNC_CAP_ISCSI                0x22
 #define I40E_DEV_FUNC_CAP_RSS          0x40
 #define I40E_DEV_FUNC_CAP_RX_QUEUES    0x41
 #define I40E_DEV_FUNC_CAP_TX_QUEUES    0x42
@@ -2904,6 +2905,10 @@ STATIC void i40e_parse_discover_capabilities(struct 
i40e_hw *hw, void *buff,
                        if (number == 1)
                                p->fcoe = true;
                        break;
+               case I40E_DEV_FUNC_CAP_ISCSI:
+                       if (number == 1)
+                               p->iscsi = true;
+                       break;
                case I40E_DEV_FUNC_CAP_RSS:
                        p->rss = true;
                        p->rss_table_size = number;
diff --git a/lib/librte_pmd_i40e/i40e/i40e_type.h 
b/lib/librte_pmd_i40e/i40e/i40e_type.h
index 5cca7f8..5e65e19 100644
--- a/lib/librte_pmd_i40e/i40e/i40e_type.h
+++ b/lib/librte_pmd_i40e/i40e/i40e_type.h
@@ -289,6 +289,7 @@ struct i40e_hw_capabilities {
        bool evb_802_1_qbh; /* Bridge Port Extension */
        bool dcb;
        bool fcoe;
+       bool iscsi; /* Indicates iSCSI enabled */
        bool mfp_mode_1;
        bool mgmt_cem;
        bool ieee_1588;
-- 
1.8.1.4

Reply via email to