Index: /branches/rel_apv_10_7_4/usr/click/lib/libip/ipvers.c
===================================================================
--- /branches/rel_apv_10_7_4/usr/click/lib/libip/ipvers.c	(revision 39851)
+++ /branches/rel_apv_10_7_4/usr/click/lib/libip/ipvers.c	(working copy)
@@ -709,12 +709,10 @@
 	return 0;
 }
 
+/* TWSD-1249, retrieve NIC inforamtion from DPDK instead of kernel*/
 static int print_nic_info(void)
 {
-	FILE *stream = NULL;
-	FILE *fp = fopen("/ca/conf/nic_fw_info.log", "r");
-	char cmd[64] = {0};
-	char nic_dev[128];
+	FILE *fp = popen("lspci -D | grep Ethernet", "r");
 	char line[128] = {0};
 
 	if(NULL == fp){
@@ -724,42 +722,17 @@
 	printf("Network Interface : \n");
 	while (fgets(line, sizeof(line), fp)) {
 		int port_id = -1;
-		int bus = -1,devid = -1,function = 0;
-		int len = strlen(line);
-		char *pos = 0;
+		unsigned int domain = -1, bus = -1,devid = -1,function = 0;
 		char *find = NULL;
-		
-		if(pos=strstr(line,"enp")){       
-			bus = atoi(pos+3);
-		}
-		
-		if(pos=strstr(line,"s")){
-			devid = atoi(pos+1);
-		}
-
-		if(pos=strstr(line,"f")){
-			function = atoi(pos+1);
-		}
-		
-		pos=strstr(line,":");
-		
-		/* p<bus>s<slot>[f<function>][d<dev_id>] PCI geographical location, function maybe ignore, default as 0*/
-		if( (-1 == bus) ||
-			(-1 == devid) ||
-			(0 == pos)){
+		char *nic_dev = NULL;
+		char *nic_fw = NULL;
 
+		if (sscanf(line, "%x:%x:%x.%x", &domain, &bus, &devid, &function) != 4) {
 			continue;
 		}
 
-		sprintf(cmd,"lspci | grep %02x:%02x.%x | awk -F\":\" \'{print $3}\'",bus,devid,function);
-
-		stream = popen(cmd, "r");
-		if (stream == NULL) {
-			continue;
-		}
-		
-		if(fgets(nic_dev, sizeof(nic_dev), stream) == NULL){
-			pclose(stream);
+		nic_dev = strchr(line, ' ');
+		if (nic_dev == NULL) {
 			continue;
 		}
 
@@ -767,16 +740,23 @@
 		if(find){
 			*find = '\0';
 		}                          
-		
-		pclose(stream);
 
 		port_id = get_port_id_with_pci_bdf(bus,devid,function);
-		if(-1 != port_id){
-			printf("\tPort%d:%s,%s",(port_id + 1),nic_dev,pos+1);
+		if (port_id == -1) {
+			continue;
+		}
+		printf("\tPort%d:%s, ",(port_id + 1),nic_dev);
+		int len = 0;
+		get_nic_fw_version(port_id, &nic_fw, &len);
+		if(nic_fw){
+			printf("%s", nic_fw);
+			free(nic_fw);
 		}
+		printf("\n");
+
 	}
-	
-	fclose(fp);
+
+	pclose(fp);
 	return 0;
 }
 
Index: /branches/rel_apv_10_7_4/usr/click/lib/libkernelapi/addCommands.pm
===================================================================
--- /branches/rel_apv_10_7_4/usr/click/lib/libkernelapi/addCommands.pm	(revision 39851)
+++ /branches/rel_apv_10_7_4/usr/click/lib/libkernelapi/addCommands.pm	(working copy)
@@ -11396,6 +11396,14 @@
 				{type => "U32"},
 		],
 	},
+    {
+		cmd_attribute => "CMD_KERN_API",
+		function_name => "get_nic_fw_version",
+		function_args => [
+				{type => "U32"},
+				{type => "OUTDATA"},
+		],
+	},
 	{
 		cmd_attribute => "CMD_KERN_API|CMD_KAPI_NOLOCK",
 		function_name => "get_vlan_state",
Index: /branches/rel_apv_10_7_4/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_if_dpdk.c
===================================================================
--- /branches/rel_apv_10_7_4/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_if_dpdk.c	(revision 39851)
+++ /branches/rel_apv_10_7_4/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_if_dpdk.c	(working copy)
@@ -3435,6 +3435,22 @@
 	return rte_eth_get_port_id_by_pci_bdf(bus,devid,function);
 }
 
+/*TWSD-1249*/
+#define MAX_BUF_LEN 128
+int get_nic_fw_version(void *pcb, uint32_t port_id, void **fw_version, int32_t *fw_size)
+{
+	char *buf = malloc(MAX_BUF_LEN, M_TEMP, M_NOWAIT | M_ZERO);
+	if (buf == NULL) return -1;
+	int ret = rte_eth_dev_fw_version_get(port_id, buf, MAX_BUF_LEN);
+	if (ret) {
+        free(buf, M_TEMP);
+        return ret;
+    }
+	*fw_size = strlen(buf);
+	*fw_version = buf;
+	return ret;
+}
+
 uint64_t 
 get_llb_link_route_interface_bandwidth(struct ifnet *rt_ifp)
 {
