Index: /branches/rel_apv_10_7/usr/click/bin/encode_lickey/enckey.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/bin/encode_lickey/enckey.html	(revision 39981)
+++ /branches/rel_apv_10_7/usr/click/bin/encode_lickey/enckey.html	(working copy)
@@ -905,6 +905,12 @@
 				Array ASI 11900
 				<OPTION>
 				Array ASI 2900
+				<OPTION>
+				Array APV 7900 N
+				<OPTION>
+				Array APV 9900 N
+				<OPTION>
+				Array APV 11900 N
 			</SELECT>
 			<BR>
 			<BR>
Index: /branches/rel_apv_10_7/usr/click/lib/libfeactl/feactl.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libfeactl/feactl.c	(revision 39981)
+++ /branches/rel_apv_10_7/usr/click/lib/libfeactl/feactl.c	(working copy)
@@ -333,6 +333,12 @@
      2000, NULL},
   { ARRAY_PRODINFO_ASI2900, AFM_MODEL_2900_ASI, 0x00004002, 0x00000007, 1024*32,
      2000, NULL},
+  { ARRAY_PRODINFO_APV7900N, AFM_MODEL_7900N_APV, 0x00004002, 0x00000007, 1024*256,
+     2000, NULL},
+  { ARRAY_PRODINFO_APV9900N, AFM_MODEL_9900N_APV, 0x00004002, 0x00000007, 1024*256,
+     2000, NULL},
+  { ARRAY_PRODINFO_APV11900N, AFM_MODEL_11900N_APV, 0x00004002, 0x00000007, 1024*256,
+     2000, NULL},
 };
 
 array_feature_t array_features[MAX_FEATURE] =
Index: /branches/rel_apv_10_7/usr/click/lib/libfeactl/feactl_handlers.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libfeactl/feactl_handlers.c	(revision 39981)
+++ /branches/rel_apv_10_7/usr/click/lib/libfeactl/feactl_handlers.c	(working copy)
@@ -119,6 +119,9 @@
 			case AFM_MODEL_9900_APV:
 			case AFM_MODEL_11900_ASI:
 			case AFM_MODEL_2900_ASI:
+			case AFM_MODEL_7900N_APV:
+			case AFM_MODEL_9900N_APV:
+			case AFM_MODEL_11900N_APV:
 				return (0);
 		    default:
 		        break;
Index: /branches/rel_apv_10_7/usr/click/lib/libintel_dpdk/config/common_base
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libintel_dpdk/config/common_base	(revision 39981)
+++ /branches/rel_apv_10_7/usr/click/lib/libintel_dpdk/config/common_base	(working copy)
@@ -118,7 +118,7 @@
 #
 CONFIG_RTE_LIBRTE_ETHER=y
 CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n
-CONFIG_RTE_MAX_ETHPORTS=82
+CONFIG_RTE_MAX_ETHPORTS=256
 CONFIG_RTE_MAX_QUEUES_PER_PORT=1024
 CONFIG_RTE_LIBRTE_IEEE1588=n
 CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16
Index: /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_host_pci.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_host_pci.c	(revision 39981)
+++ /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_host_pci.c	(working copy)
@@ -91,6 +91,21 @@
 }
 
 void
+get_nic_vendor_device_id_on_pcib(int pcib, int f, int nic, uint16_t *vendor_id, uint16_t *device_id, uint16_t *subsystem_vendor_id, uint16_t *subsystem_device_id)
+{
+	int port_id;
+	struct rte_pci_device*	dev_pci;
+
+	port_id = pcib_nicdevs[pcib].port_ids[f][nic];
+	dev_pci = RTE_DEV_TO_PCI(rte_eth_devices[port_id].device);
+
+	*vendor_id = dev_pci->id.vendor_id;
+	*device_id = dev_pci->id.device_id;
+	*subsystem_vendor_id = dev_pci->id.subsystem_vendor_id;
+	*subsystem_device_id = dev_pci->id.subsystem_device_id;
+}
+
+void
 get_pcib_bdf(int pcib, int f, int *bus, int *dev, int *func)
 {
 	*bus = pcib_nicdevs[pcib].bus;
Index: /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_machdep.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_machdep.c	(revision 39981)
+++ /branches/rel_apv_10_7/usr/click/lib/libuinet-atcp/lib/libuinet/uinet_machdep.c	(working copy)
@@ -1031,6 +1031,27 @@
 			dual_power_mode = 1;
 			powersupply_id = 210112;
 			break;
+		// CASwell hardward platform
+		// added in 2026
+		// for APV1900N/2900N/5900N/7900N/9900N/11900N
+		// due to 902901 is used by APV2900ASI before
+		// so keep 902901 for APV2900ASI
+		// this series uses "2" to identify N version
+		case 907902:
+			model_id = AFM_MODEL_7900N_APV;
+			dual_power_mode = 1;
+			powersupply_id = 210112;
+			break;
+		case 909902:
+			model_id = AFM_MODEL_9900N_APV;
+			dual_power_mode = 1;
+			powersupply_id = 210112;
+			break;
+		case 911902:
+			model_id = AFM_MODEL_11900N_APV;
+			dual_power_mode = 1;
+			powersupply_id = 210112;
+			break;
 		default: /*NOT specified model */
 			break;
 		}
@@ -1131,6 +1152,11 @@
 		case AFM_MODEL_9900_APV:
 			ledctl_mode = LEDCTL_AEWIN_CB1920;
 			break;
+		case AFM_MODEL_7900N_APV:
+		case AFM_MODEL_9900N_APV:
+		case AFM_MODEL_11900N_APV:
+			ledctl_mode = LEDCTL_CASWELL_CAR5070;
+			break;
 		default:
 			ledctl_mode = LEDCTL_SERIAL;
 			break;
Index: /branches/rel_apv_10_7/usr/src/sys/click/app/util/feactl_kern.h
===================================================================
--- /branches/rel_apv_10_7/usr/src/sys/click/app/util/feactl_kern.h	(revision 39981)
+++ /branches/rel_apv_10_7/usr/src/sys/click/app/util/feactl_kern.h	(working copy)
@@ -80,7 +80,10 @@
 #define AFM_MODEL_8900_APV 71
 #define AFM_MODEL_11900_ASI 72
 #define AFM_MODEL_2900_ASI 73
-#define MAX_MODEL          74
+#define AFM_MODEL_7900N_APV 74
+#define AFM_MODEL_9900N_APV 75
+#define AFM_MODEL_11900N_APV 76
+#define MAX_MODEL          77
 
 #define AFM_WR_INVALID_MODEL       -1
 #define	AFM_WR_MODEL_vAPV		0
Index: /branches/rel_apv_10_7/usr/src/sys/click/net/if_cafw.c
===================================================================
--- /branches/rel_apv_10_7/usr/src/sys/click/net/if_cafw.c	(revision 39981)
+++ /branches/rel_apv_10_7/usr/src/sys/click/net/if_cafw.c	(working copy)
@@ -511,79 +511,15 @@
 };
 
 // Caswell CAR-5070
-// PCI Bridge 0.0 (0000:00:0c.0): 1 NICs found
-// PCI Bridge 1.0 (0000:00:0d.0): 0 NICs found
-// PCI Bridge 2.0 (0000:00:0e.0): 1 NICs found
-// PCI Bridge 3.0 (0000:29:01.0): 4 NICs found
-// PCI Bridge 4.0 (0000:29:05.0): 4 NICs found
-// PCI Bridge 5.0 (0000:aa:01.0): 8 NICs found
-// PCI Bridge 6.0 (0000:aa:05.0): 8 NICs found
-// PCI Bridge 7.0 (0000:16:05.0): 1 NICs found
-// PCI Bridge 8.0 (0000:98:05.0): 2 NICs found
-/*
- +-[0000:aa]-+-01.0-[ab-ac]--+-00.0  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.1  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.2  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.3  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.4  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.5  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.6  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               \-00.7  Intel Corporation Ethernet Controller E810-C for SFP
- |           \-05.0-[ad-ae]--+-00.0  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.1  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.2  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.3  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.4  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.5  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.6  Intel Corporation Ethernet Controller E810-C for SFP
- |                           \-00.7  Intel Corporation Ethernet Controller E810-C for SFP
-//----- APV 9900 ----- //
- +-[0000:98]-+-05.0-[99]--+-00.0  Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+
- |                        \-00.1  Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+
-//----- APV 11900 ----- //
- +-[0000:98]-+-01.0-[99]--+-00.0  Mellanox Technologies MT27800 Family [ConnectX-5]
- |                        \-00.1  Mellanox Technologies MT27800 Family [ConnectX-5]
-// ----- end -----//
- +-[0000:29]-+-01.0-[2a-2b]--+-00.0  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.1  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               +-00.2  Intel Corporation Ethernet Controller E810-C for SFP
- |           |               \-00.3  Intel Corporation Ethernet Controller E810-C for SFP
- |           \-05.0-[2c-2d]--+-00.0  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.1  Intel Corporation Ethernet Controller E810-C for SFP
- |                           +-00.2  Intel Corporation Ethernet Controller E810-C for SFP
- |                           \-00.3  Intel Corporation Ethernet Controller E810-C for SFP
-//----- APV 9900 ----- //
- +-[0000:16]-+-05.0-[17-18]----00.0  Intel Corporation Ethernet Controller E810-C for QSFP
-// ----- end -----//
- \-[0000:00]-+-0c.0-[01]----00.0  Intel Corporation I210 Gigabit Network Connection
-             +-0e.0-[04]----00.0  Intel Corporation I210 Gigabit Network Connection
-*/
-/*
- Physical layout of CAR-5070: Front view
-
- PCI Bridge                                 7                                 8
-                                        ┌──────┐                    ┌───────────────────┐
-                                        │  27  │                    │    28   │    29   │
-                                        └──────┘                    └───────────────────┘
-                                                                    ┌────┬────┬────┬────┐ ┌────┬────┬────┬────┐
- ┌───────┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬────┐ │ 11 │ 13 │ 15 │ 17 │ │ 19 │ 21 │ 23 │ 25 │
- │console│USB│USB│ 1 │ 2 │BMC│ │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 10 │ │ 12 │ 14 │ 16 │ 18 │ │ 20 │ 22 │ 24 │ 26 │
- └───────┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴────┘ └────┴────┴────┴────┘ └────┴────┴────┴────┘
- PCI Bridge        0   2               4                 3                    6                     5
-*/
-static struct pcib_slot_map nic_slot_map_pcib_CAR5070[4][MAX_SLOTS] = {
-	{	// onboard NICs
-		{0, 0}, {2, 0}, {-1, -1},
-	},
-	{	// 25G NICs x 4 on lower
-		{4, 0}, {3, 0}, {-1, -1},
+// Dynamic NIC mapping based on installed PCIe cards
+// call generate_CAR5070_nics_map() to generate the mapping
+static struct pcib_slot_map nic_slot_map_pcib_CAR5070[MAX_SUBMAP][MAX_SLOTS] = {
+	{
+		{-1, -1},
 	},
-	{	// 10G NICx x 8, re-ordered on lower
-		{6, 0}, {5, 0}, {-1, -1},
+	{
+		{-1, -1},
 	},
-	{	// other NIC on upper
-		{7, 0}, {8, 0}, {-1, -1},
-	}
 };
 
 /*
@@ -598,7 +534,7 @@
  * Top row:    0, 2, 4, 6
  * Bottom row: 1, 3, 5, 7
 */
-static int nic_map_car5070_8ports[8] = {6, 7, 4, 5, 2, 3, 0, 1};
+static int nic_map_car5070_E810_C_SFP_8ports[8] = {6, 7, 4, 5, 2, 3, 0, 1};
 
 /* The PCI address for MARBLE onboard NIC is 06:00.0, 06:00.1, 06:00.2, 06:00.3*/
 #define MARBLE_ONBOARD_NIC_BUS 6
@@ -1575,8 +1511,18 @@
 				n = nic_map_4x10g_fiber[j];
 			} else if (is_4x10g_combo_im_nic) {
 				n = nic_map_4x10g_combo[j];
-			} else if (chipset_id == CHIPSET_ID_CAR5070 && submap == 2) {
-				n = nic_map_car5070_8ports[j];
+			} else if (chipset_id == CHIPSET_ID_CAR5070 && submap == NICS_ON_SLOTS) {
+				/* CAR5070 8-ports NIC port mapping */
+				uint16_t vendor_id, device_id;
+				uint16_t sub_vendor_id, sub_device_id;
+				get_nic_vendor_device_id_on_pcib(idx, func_idx, 0, &vendor_id, &device_id, &sub_vendor_id, &sub_device_id);
+
+				if (vendor_id == 0x8086 && device_id == 0x1593 && num_nics == 8) {
+					// Intel 8-ports Ethernet Controller E810-C for SFP
+					n = nic_map_car5070_E810_C_SFP_8ports[j];
+				} else {
+					n = j;
+				}
 			} else {
 				n = j;
 			}
@@ -1664,29 +1610,217 @@
 	int temp_dev;
 	int temp_func;
 
-	for(idx = 0; idx < total_pcib-1; idx++) {
-		func_idx = 0;
-		for (n = 0; n < get_num_nics_on_pcib(idx, func_idx); n++) {
-			get_nic_bdf_on_pcib(idx, func_idx, n, &temp_bus, &temp_dev, &temp_func);
-			if (temp_bus != bus || temp_dev != dev || temp_func != func) {
-				continue;
+	for(idx = 0; idx < total_pcib; idx++) {
+		for (func_idx = 0; func_idx < 7; func_idx++) {
+			for (n = 0; n < get_num_nics_on_pcib(idx, func_idx); n++) {
+				get_nic_bdf_on_pcib(idx, func_idx, n, &temp_bus, &temp_dev, &temp_func);
+				if (temp_bus != bus || temp_dev != dev || temp_func != func) {
+					continue;
+				}
+
+				printf("found NIC dpdk%d (%02x:%02x.%x) on ", nic_port_id_on_pcib(idx, func_idx, n), temp_bus, temp_dev, temp_func);
+				get_pcib_bdf(idx, func_idx, &temp_bus, &temp_dev, &temp_func);
+				printf(" (%02x:%02x.%x)\n", temp_bus, temp_dev, temp_func);
+
+				snprintf(nic_hw[*total_nic].hw_id, CA_HWLEN,
+					"dpdk%d", nic_port_id_on_pcib(idx, func_idx, n));
+				snprintf(nic_hw[*total_nic].vhw_id, CA_NLEN,
+					"atcp_veth%d", nic_port_id_on_pcib(idx, func_idx, n));
+
+				nic_hw[*total_nic].slot_id[0] = '\0';
+				*total_nic = *total_nic + 1;
 			}
+		}
+	}
+}
 
-			printf("found NIC dpdk%d (%02x:%02x.%x) on ", nic_port_id_on_pcib(idx, func_idx, n), temp_bus, temp_dev, temp_func);
-			get_pcib_bdf(idx, func_idx, &temp_bus, &temp_dev, &temp_func);
-			printf(" (%02x:%02x.%x)\n", temp_bus, temp_dev, temp_func);
+struct nic_group {
+    int pcib_idx;
+    int func_idx;
+    int port_count;
+    uint16_t vendor_id;
+    uint16_t device_id;
+    uint16_t sub_vendor_id;
+    uint16_t sub_device_id;
+};
 
-			snprintf(nic_hw[*total_nic].hw_id, CA_HWLEN,
-				 "dpdk%d", nic_port_id_on_pcib(idx, func_idx, n));
-			snprintf(nic_hw[*total_nic].vhw_id, CA_NLEN,
-				 "atcp_veth%d", nic_port_id_on_pcib(idx, func_idx, n));
+static void
+find_nics_group_by_pcib(int *start_pcib_bdf, int *end_pcib_bdf, struct nic_group *found_nic_group, int *found_nic_group_count)
+{
+	int group_count = 0;;
+	int n;
+	int found;
+	int bus, dev, func;
+	int tmp_bus, tmp_dev, tmp_func;
+	int idx, func_idx;
+	uint16_t vendor_id, device_id;
+	uint16_t sub_vendor_id, sub_device_id;
 
-			nic_hw[*total_nic].slot_id[0] = '\0';
-			*total_nic = *total_nic + 1;
+	*found_nic_group_count = 0;
+
+	// Validate the input range
+	if (start_pcib_bdf[0] < 0 || start_pcib_bdf[0] > 255 ||
+	    start_pcib_bdf[1] < 0 || start_pcib_bdf[1] > 31 ||
+	    start_pcib_bdf[2] < 0 || start_pcib_bdf[2] > 7 ||
+	    end_pcib_bdf[0] < 0 || end_pcib_bdf[0] > 255 ||
+	    end_pcib_bdf[1] < 0 || end_pcib_bdf[1] > 31 ||
+	    end_pcib_bdf[2] < 0 || end_pcib_bdf[2] > 7) {
+		return;
+	}
+
+	// Validate the input range order
+	if ((start_pcib_bdf[0] << 8 | start_pcib_bdf[1] << 3 | start_pcib_bdf[2]) >
+	    (end_pcib_bdf[0] << 8 | end_pcib_bdf[1] << 3 | end_pcib_bdf[2])) {
+		return;
+	}
+
+	for (bus = start_pcib_bdf[0]; bus <= end_pcib_bdf[0]; bus++) {
+		for (
+			dev = (bus == start_pcib_bdf[0] ? start_pcib_bdf[1] : 0);
+			dev <= (bus == end_pcib_bdf[0] ? end_pcib_bdf[1] : 31);
+			dev++) {
+			for (
+				func = (bus == start_pcib_bdf[0] && dev == start_pcib_bdf[1] ? start_pcib_bdf[2] : 0);
+				func <= (bus == end_pcib_bdf[0] && dev == end_pcib_bdf[1] ? end_pcib_bdf[2] : 7);
+				func++) {
+				found = 0;
+				for(idx = 0; idx < total_pcib && !found && group_count < 32; idx++) {
+					for (func_idx = 0; func_idx < 8 && !found && group_count < 32; func_idx++) {
+						get_pcib_bdf(idx, func_idx, &tmp_bus, &tmp_dev, &tmp_func);
+
+						if (tmp_bus != bus || tmp_dev != dev || tmp_func != func) {
+							continue;
+						}
+
+						n = get_num_nics_on_pcib(idx, func_idx);
+						if (n > 0) {
+							get_nic_vendor_device_id_on_pcib(idx, func_idx, 0, &vendor_id, &device_id, &sub_vendor_id, &sub_device_id);
+
+							found_nic_group[group_count].pcib_idx = idx;
+							found_nic_group[group_count].func_idx = func_idx;
+							found_nic_group[group_count].port_count = n;
+							found_nic_group[group_count].vendor_id = vendor_id;
+							found_nic_group[group_count].device_id = device_id;
+							found_nic_group[group_count].sub_vendor_id = sub_vendor_id;
+							found_nic_group[group_count].sub_device_id = sub_device_id;
+							group_count++;
+						}
+
+						found = 1;
+					}
+				}
+			}
 		}
 	}
+
+	*found_nic_group_count = group_count;
 }
 
+/*
+ Physical layout of CAR-5070: Front view
+                               ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
+                               │      7      │ │      8      │ │      9      │ │     10      │
+                               └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
+ ┌───────┬───┬───┬───┬───┬───┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
+ │console│USB│USB│ 1 │ 2 │BMC│ │      3      │ │      4      │ │      5      │ │      6      │
+ └───────┴───┴───┴───┴───┴───┘ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
+ PCI Bridge:
+ - 1st slot: 00:0c.0
+ - 2nd slot: 00:0e.0
+ - 3rd and 4th slots: 29:01.0 ~ 29:05.7 (reversed order)
+ - 5th and 6th slots: aa:01.0 ~ aa:05.7 (reversed order)
+ - 7th and 8th slots: 16:01.0 ~ 16:05.7 (reversed order)
+ - 9th and 10th slots: 98:01.0 ~ 98:05.7 (reversed order)
+
+ Intel 8-ports Ethernet Controller E810-C for SFP
+ Re-mapping in add_nics() function.
+*/
+static void
+generate_CAR5070_nics_map()
+{
+	int i, j;
+	struct nic_group found_nic_group[32];
+	int found_nic_group_count = 0;
+
+	// find on borad NIC
+	// Intel I210 Gigabit Network Connection
+	// vendor_id == 0x8086 && device_id == 0x1533
+	// 00:0c.0
+	// 00:0e.0
+	int onboard_pcib_bdf[2][3] = {
+		{0x00, 0x0c, 0x00},
+		{0x00, 0x0e, 0x07}
+	};
+
+	find_nics_group_by_pcib(onboard_pcib_bdf[0], onboard_pcib_bdf[1], found_nic_group, &found_nic_group_count);
+	for (i = 0; i < found_nic_group_count; i++) {
+		nic_slot_map_pcib_CAR5070[0][i].dev_idx = found_nic_group[i].pcib_idx;
+		nic_slot_map_pcib_CAR5070[0][i].func_idx = found_nic_group[i].func_idx;
+	}
+	nic_slot_map_pcib_CAR5070[0][i].dev_idx = -1;
+	nic_slot_map_pcib_CAR5070[0][i].func_idx = -1;
+
+	// find PCIe slot NICs
+	int slot_idx;
+	int slot_pcib_bdf[4][2][3] = {
+		{	// left bottom slot, need reverse the order of all found NIC groups
+			{0x29, 0x01, 0x00},	// start from 29:01.0
+			{0x29, 0x05, 0x07}	// end at 29:05.7
+		},
+		{	// right bottom slot, need reverse the order of all found NIC groups
+			{0xaa, 0x01, 0x00},	// start from aa:01.0
+			{0xaa, 0x05, 0x07}	// end at aa:05.7
+		},
+		{	// left top slot, need reverse the order of all found NIC groups
+			{0x16, 0x01, 0x00},	// start from 16:01.0
+			{0x16, 0x05, 0x07}	// end at 16:05.7
+		},
+		{	// right top slot, need reverse the order of all found NIC groups
+			{0x98, 0x01, 0x00},	// start from 98:01.0
+			{0x98, 0x05, 0x07}	// end at 98:05.7
+		},
+	};
+
+	j = 0;
+	for (slot_idx = 0; slot_idx < 4; slot_idx++) {
+		find_nics_group_by_pcib(slot_pcib_bdf[slot_idx][0], slot_pcib_bdf[slot_idx][1], found_nic_group, &found_nic_group_count);
+
+		for (i = 0; i < found_nic_group_count / 2; i++) {
+			struct nic_group temp_nic_group;
+			memcpy(&temp_nic_group, &found_nic_group[i], sizeof(struct nic_group));
+			memcpy(&found_nic_group[i], &found_nic_group[found_nic_group_count - 1 - i], sizeof(struct nic_group));
+			memcpy(&found_nic_group[found_nic_group_count - 1 - i], &temp_nic_group, sizeof(struct nic_group));
+		}
+
+		for (i = 0; i < found_nic_group_count; i++) {
+			nic_slot_map_pcib_CAR5070[1][j].dev_idx = found_nic_group[i].pcib_idx;
+			nic_slot_map_pcib_CAR5070[1][j].func_idx = found_nic_group[i].func_idx;
+			j++;
+		}
+	}
+	nic_slot_map_pcib_CAR5070[1][j].dev_idx = -1;
+	nic_slot_map_pcib_CAR5070[1][j].func_idx = -1;
+
+	printf("CAR-5070 NIC map generated:\n");
+	for (i = 0; i < MAX_SLOTS; i++) {
+		if (nic_slot_map_pcib_CAR5070[0][i].dev_idx == -1) {
+			break;
+		}
+		printf(
+			"onboard: PCIB %d.%d\n",
+			nic_slot_map_pcib_CAR5070[0][i].dev_idx,
+			nic_slot_map_pcib_CAR5070[0][i].func_idx);
+	}
+	for (i = 0; i < MAX_SLOTS; i++) {
+		if (nic_slot_map_pcib_CAR5070[1][i].dev_idx == -1) {
+			break;
+		}
+		printf(
+			"onslot: PCIB %d.%d\n",
+			nic_slot_map_pcib_CAR5070[1][i].dev_idx,
+			nic_slot_map_pcib_CAR5070[1][i].func_idx);
+	}
+}
 
 void generate_X11SPL_F_nics_map()
 {
@@ -1790,10 +1924,9 @@
 		add_nics(NICS_ON_BOARD, NIC_ANY_TYPE);
 		add_nics(NICS_ON_SLOTS, NIC_ANY_TYPE);
 	} else if (chipset_id == CHIPSET_ID_CAR5070) {
-		add_nics(NICS_ON_BOARD, NIC_ANY_TYPE); // NICS_ON_BOARD = 0,
-		add_nics(NICS_ON_SLOTS, NIC_ANY_TYPE); // NICS_ON_SLOTS = 1, 25G NICs x 4 on lower
-		add_nics(2, NIC_ANY_TYPE); // 10G NICx x 8, re-ordered on lower
-		add_nics(3, NIC_ANY_TYPE); // other NIC on upper
+		generate_CAR5070_nics_map();
+		add_nics(NICS_ON_BOARD, NIC_ANY_TYPE);
+		add_nics(NICS_ON_SLOTS, NIC_ANY_TYPE);
 	}
 	
 
Index: /branches/rel_apv_10_7/usr/src/sys/click/sys/clickarray.h
===================================================================
--- /branches/rel_apv_10_7/usr/src/sys/click/sys/clickarray.h	(revision 39981)
+++ /branches/rel_apv_10_7/usr/src/sys/click/sys/clickarray.h	(working copy)
@@ -100,6 +100,9 @@
 #define ARRAY_PRODINFO_AVX9800_I "Array AVX 9800 I"
 #define ARRAY_PRODINFO_ASI11900 "Array ASI 11900"
 #define ARRAY_PRODINFO_ASI2900 "Array ASI 2900"
+#define ARRAY_PRODINFO_APV7900N "Array APV 7900 N"
+#define ARRAY_PRODINFO_APV9900N "Array APV 9900 N"
+#define ARRAY_PRODINFO_APV11900N "Array APV 11900 N"
 /* sysObjectID oid string */
 /* APV */
 #define ARRAY_COMPINFO_MIBOID_APV_STR "1"
