summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-11-13 14:59:45 +0200
committerHanoh Haim <hhaim@cisco.com>2016-11-13 15:03:21 +0200
commit9d9f3dd8e95c3621bc4c88a3172fabb82dcd9e7d (patch)
tree4fba2f8b3802eaa5d294ddfa4cac3fa60e3840cb /src
parente7d064b2d89d39d69520f2f6e7720aec65cc32de (diff)
enic verify fw version
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/main_dpdk.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index 8789c926..ab154b67 100644
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -397,7 +397,7 @@ public:
return (true);
}
- virtual int verify_fw_ver(int i) {return 0;}
+ virtual int verify_fw_ver(int i);
virtual void update_configuration(port_cfg_t * cfg);
@@ -6735,6 +6735,28 @@ int CTRexExtendedDriverBaseVIC::configure_rx_filter_rules_statefull(CPhyEthIF *
return 0;
}
+extern "C" int enicpmd_dev_get_fw_support(int port_id,
+ uint32_t *ver);
+
+
+int CTRexExtendedDriverBaseVIC::verify_fw_ver(int port_id) {
+
+ uint32_t ver;
+ int ret=enicpmd_dev_get_fw_support(port_id,&ver);
+
+ if (ret==0) {
+ if (CGlobalInfo::m_options.preview.getVMode() >= 1) {
+ printf("VIC port %d: FW support advanced filtering \n", port_id);
+ }
+ }else{
+ printf("Error: VIC firmware should upgrade to support advanced filtering \n");
+ printf(" Please refer to %s for upgrade instructions\n",
+ "https://trex-tgn.cisco.com/trex/doc/trex_manual.html");
+ exit(1);
+ }
+ return (0);
+}
+
int CTRexExtendedDriverBaseVIC::configure_rx_filter_rules(CPhyEthIF * _if) {