Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/add_log_for_virtchnl.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/add_log_for_virtchnl.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/add_log_for_virtchnl.patch	(working copy)
@@ -1,18 +1,18 @@
---- i40e-1.6.42/src/i40e_virtchnl_pf.c.old	2023-05-04 21:27:54.472909640 -0700
-+++ i40e-1.6.42/src/i40e_virtchnl_pf.c	2023-05-04 21:32:30.553612977 -0700
-@@ -2208,8 +2208,10 @@
- 	int valid_len = 0;
+--- i40e-1.4.25.new/src/i40e/i40e_virtchnl_pf.c	2016-06-30 11:11:04.268154863 +0800
++++ i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c	2016-07-17 16:49:42.540145659 +0800
+@@ -1875,8 +1875,10 @@
+ 	int valid_len;
  
  	/* Check if VF is disabled. */
 -	if (test_bit(I40E_VF_STAT_DISABLED, &vf->vf_states))
-+	if (test_bit(I40E_VF_STAT_DISABLED, &vf->vf_states)){
++	if (test_bit(I40E_VF_STAT_DISABLED, &vf->vf_states)) {
 +		dev_err(&vf->pf->pdev->dev, "test bit failed.\n");
  		return I40E_ERR_PARAM;
-+	}
++    }
  
  	/* Validate message length. */
  	switch (v_opcode) {
-@@ -2355,8 +2357,8 @@
+@@ -1996,8 +1998,8 @@
  	ret = i40e_vc_validate_vf_msg(vf, v_opcode, v_retval, msg, msglen);
  
  	if (ret) {
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/allow_VF_MAC_configuration.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/allow_VF_MAC_configuration.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/allow_VF_MAC_configuration.patch	(working copy)
@@ -1,13 +1,13 @@
---- i40e-1.6.42/src/i40e_virtchnl_pf.c.old	2023-05-04 21:22:09.911768161 -0700
-+++ i40e-1.6.42/src/i40e_virtchnl_pf.c	2023-05-04 21:23:06.132485918 -0700
-@@ -1785,9 +1785,8 @@
+--- i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c	2016-06-29 22:58:53.263205732 -0400
++++ i40e-1.4.25.new/src/i40e/i40e_virtchnl_pf.c	2016-06-29 23:11:04.268154863 -0400
+@@ -1613,9 +1613,8 @@
  		 * The VF may request to set the MAC address filter already
  		 * assigned to it so do not return an error in that case.
  		 */
 -		dev_err(&pf->pdev->dev,
 +		dev_warn(&pf->pdev->dev,
- 			"VF attempting to override administratively set MAC address, reload the VF driver to resume normal operation\n");
+ 			"VF attempting to override administratively set MAC address\nPlease reload the VF driver to resume normal operation\n");
 -		ret = -EPERM;
- 	} else if ((vf->num_mac >= I40E_VC_MAX_MAC_ADDR_PER_VF) &&
- 		   !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
- 		dev_err(&pf->pdev->dev,
+ 	}
+ 	return ret;
+ }
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/allow_vlan0_work.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/allow_vlan0_work.patch	(revision 0)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/allow_vlan0_work.patch	(working copy)
@@ -0,0 +1,11 @@
+--- i40e-1.4.25/src/i40e/i40e_main.c.bak	2018-08-29 08:35:25.779149398 -0400
++++ i40e-1.4.25/src/i40e/i40e_main.c	2018-08-29 08:35:31.743149624 -0400
+@@ -1279,7 +1279,7 @@
+ 	 * so we have to go through all the list in order to make sure
+ 	 */
+ 	list_for_each_entry(f, &vsi->mac_filter_list, list) {
+-		if (f->vlan >= 0 || vsi->info.pvid)
++		if (f->vlan > 0 || vsi->info.pvid)
+ 			return true;
+ 	}
+ 

Property changes on: 3rdpartyappliance/centos-i40e/SOURCES/allow_vlan0_work.patch
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/avx_get_i40e_info.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/avx_get_i40e_info.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/avx_get_i40e_info.patch	(working copy)
@@ -1,8 +1,8 @@
-diff --git a/i40e-1.6.42/src/i40e.h b/i40e-1.6.42/src/i40e.h
-index 81119bc..a72ee19 100644
---- a/i40e-1.6.42/src/i40e.h
-+++ b/i40e-1.6.42/src/i40e.h
-@@ -301,6 +301,22 @@ struct i40e_tc_configuration {
+diff --git a/i40e-1.4.25/src/i40e/i40e.h b/i40e-1.4.25/src/i40e/i40e.h
+index e23ca10..d38932f 100644
+--- a/i40e-1.4.25/src/i40e/i40e.h
++++ b/i40e-1.4.25/src/i40e/i40e.h
+@@ -318,6 +318,22 @@ struct i40e_tc_configuration {
  	struct i40e_tc_info tc_info[I40E_MAX_TRAFFIC_CLASS];
  };
  
@@ -22,18 +22,10 @@
 +    u64 bytes_out_old;
 +};
 +
- struct i40e_udp_port_config {
- 	/* AdminQ command interface expects port number in Host byte order */
- 	u16 port;
-@@ -331,6 +347,7 @@ struct i40e_udp_port_config {
- 				       I40E_PRTQF_FLX_PIT_FSIZE_MASK) >> \
- 				       I40E_PRTQF_FLX_PIT_FSIZE_SHIFT)
- 
-+
  /* struct that defines the Ethernet device */
  struct i40e_pf {
  	struct pci_dev *pdev;
-@@ -420,6 +437,10 @@ struct i40e_pf {
+@@ -374,6 +390,10 @@ struct i40e_pf {
  	struct timer_list service_timer;
  	struct work_struct service_task;
  
@@ -44,11 +36,11 @@
  	u64 flags;
  #define I40E_FLAG_RX_CSUM_ENABLED		BIT_ULL(1)
  #define I40E_FLAG_MSI_ENABLED			BIT_ULL(2)
-diff --git a/i40e-1.6.42/src/i40e_main.c b/i40e-1.6.42/src/i40e_main.c
-index 4dd9457..51335d8 100644
---- a/i40e-1.6.42/src/i40e_main.c
-+++ b/i40e-1.6.42/src/i40e_main.c
-@@ -74,6 +74,14 @@ static int i40e_setup_pf_filter_control(struct i40e_pf *pf);
+diff --git a/i40e-1.4.25/src/i40e/i40e_main.c b/i40e-1.4.25/src/i40e/i40e_main.c
+index 27d3121..f7c86bb 100644
+--- a/i40e-1.4.25/src/i40e/i40e_main.c
++++ b/i40e-1.4.25/src/i40e/i40e_main.c
+@@ -95,6 +95,14 @@ static void i40e_fill_rss_lut(struct i40e_pf *pf, u8 *lut,
  static void i40e_clear_rss_config_user(struct i40e_vsi *vsi);
  static void i40e_fdir_sb_setup(struct i40e_pf *pf);
  static int i40e_veb_get_bw_info(struct i40e_veb *veb);
@@ -63,7 +55,7 @@
  /* i40e_pci_tbl - PCI Device ID Table
   *
   * Last entry must be all 0s
-@@ -2504,6 +2512,8 @@ int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
+@@ -2316,6 +2324,8 @@ int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
  	case SIOCSHWTSTAMP:
  		return i40e_ptp_set_ts_config(pf, ifr);
  #endif /* HAVE_PTP_1588_CLOCK */
@@ -72,15 +64,15 @@
  	default:
  		return -EOPNOTSUPP;
  	}
-@@ -5376,6 +5386,7 @@ void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
- 	vsi->current_speed = new_speed;
+@@ -5230,6 +5240,7 @@ void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
+ 	vsi->current_isup = isup;
  
  	if (!isup) {
 +		vsi->back->info.lost_carrier++;
  		netdev_info(vsi->netdev, "NIC Link is Down\n");
  		return;
  	}
-@@ -11852,6 +11863,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -11376,6 +11387,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  	setup_timer(&pf->service_timer, i40e_service_timer, (unsigned long)pf);
  	pf->service_timer_period = HZ;
  
@@ -89,24 +81,23 @@
  	INIT_WORK(&pf->service_task, i40e_service_task);
  	clear_bit(__I40E_SERVICE_SCHED, &pf->state);
  	pf->flags |= I40E_FLAG_NEED_LINK_UPDATE;
-@@ -12027,6 +12040,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -11549,6 +11562,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	/* since everything's happy, start the service_task timer */
  	mod_timer(&pf->service_timer,
  		  round_jiffies(jiffies + pf->service_timer_period));
- 
 +	mod_timer(&pf->avx_timer, jiffies);
-+
+ 
  #ifdef I40E_FCOE
  	/* create FCoE interface */
- 	i40e_fcoe_vsi_setup(pf);
-@@ -12183,6 +12198,7 @@ static void i40e_remove(struct pci_dev *pdev)
+@@ -11708,6 +11722,7 @@ static void i40e_remove(struct pci_dev *pdev)
+ 	set_bit(__I40E_SUSPENDED, &pf->state);
  	set_bit(__I40E_DOWN, &pf->state);
- 	if (pf->service_timer.data)
- 		del_timer_sync(&pf->service_timer);
+ 	del_timer_sync(&pf->service_timer);
 +	del_timer_sync(&pf->avx_timer);
- 	if (pf->service_task.func)
- 		cancel_work_sync(&pf->service_task);
+ 	cancel_work_sync(&pf->service_task);
  
-@@ -12564,3 +12580,50 @@ static void __exit i40e_exit_module(void)
+ 	if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
+@@ -12065,3 +12080,51 @@ static void __exit i40e_exit_module(void)
  #endif
  }
  module_exit(i40e_exit_module);
@@ -157,3 +148,4 @@
 +    return copy_to_user(ifr->ifr_data, info,
 +                sizeof(*info)) ? -EFAULT : 0;
 +}
++
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/avx_get_i40e_info_bug77356.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/avx_get_i40e_info_bug77356.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/avx_get_i40e_info_bug77356.patch	(working copy)
@@ -1,6 +1,7 @@
---- BUILD/i40e-1.6.42/src/i40e_main.c.old	2023-05-05 00:40:23.841499309 -0700
-+++ BUILD/i40e-1.6.42/src/i40e_main.c	2023-05-05 00:40:19.392600776 -0700
-@@ -12601,21 +12601,21 @@
+diff -ur BUILD/i40e-1.4.25/src/i40e/i40e_main.c BUILD/i40e-1.4.25.bak/src/i40e/i40e_main.c
+--- BUILD/i40e-1.4.25/src/i40e/i40e_main.c	2018-06-05 14:21:18.152630181 +0800
++++ BUILD/i40e-1.4.25.bak/src/i40e/i40e_main.c	2018-06-05 14:02:18.862801023 +0800
+@@ -12108,20 +12108,20 @@
              vsi = pf->vsi[i];
              ns = i40e_get_vsi_stats_struct(vsi);
              packets_in_all += ns->rx_packets;
@@ -10,22 +11,23 @@
              bytes_out_all += ns->tx_bytes;
          }
      }
--    
-+
-     pf->info.bandwidth_in_packets = 
+     
+-    pf->info.bandwidth_in_packets = 
 -        (packets_in_all - pf->info.packets_in_old)/(bandwidth_timer);
-+	packets_in_all < pf->info.bytes_in_old ? 0 : (packets_in_all - pf->info.packets_in_old)/(bandwidth_timer);
-     pf->info.bandwidth_in_bits = 
+-    pf->info.bandwidth_in_bits = 
 -        ((bytes_in_all - pf->info.bytes_in_old)/(bandwidth_timer))<<3;
-+	bytes_in_all < pf->info.bytes_in_old ? 0 : ((bytes_in_all - pf->info.bytes_in_old)/(bandwidth_timer))<<3;
-     pf->info.bandwidth_out_packets = 
+-    pf->info.bandwidth_out_packets = 
 -        (packets_out_all - pf->info.packets_out_old)/(bandwidth_timer);
-+	packets_out_all < pf->info.packets_out_old ? 0 : (packets_out_all - pf->info.packets_out_old)/(bandwidth_timer);
-     pf->info.bandwidth_out_bits = 
+-    pf->info.bandwidth_out_bits = 
 -        ((bytes_out_all - pf->info.bytes_out_old)/(bandwidth_timer))<<3;
--    
-+	bytes_out_all < pf->info.bytes_out_old ? 0 : ((bytes_out_all - pf->info.bytes_out_old)/(bandwidth_timer))<<3;
-+ 
++    pf->info.bandwidth_in_packets = packets_in_all < pf->info.bytes_in_old ? 
++	0 : (packets_in_all - pf->info.packets_in_old)/(bandwidth_timer);
++    pf->info.bandwidth_in_bits = bytes_in_all < pf->info.bytes_in_old ?
++       0 : ((bytes_in_all - pf->info.bytes_in_old)/(bandwidth_timer))<<3;
++    pf->info.bandwidth_out_packets = packets_out_all < pf->info.packets_out_old ?
++       0 : (packets_out_all - pf->info.packets_out_old)/(bandwidth_timer);
++    pf->info.bandwidth_out_bits = bytes_out_all < pf->info.bytes_out_old ?
++       0 : ((bytes_out_all - pf->info.bytes_out_old)/(bandwidth_timer))<<3;
+     
      pf->info.packets_in_old = packets_in_all;
      pf->info.bytes_in_old= bytes_in_all;
-     pf->info.packets_out_old = packets_out_all;
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/backup_mac_address.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/backup_mac_address.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/backup_mac_address.patch	(working copy)
@@ -1,11 +1,9 @@
-diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
-index b8ee0d3..943c4dd 100644
---- a/src/i40e_virtchnl_pf.c
-+++ b/src/i40e_virtchnl_pf.c
-@@ -805,19 +805,6 @@ static int i40e_quiesce_vf_pci(struct i40e_vf *vf)
- 	return -EIO;
+--- i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c.old	2016-07-21 02:12:55.387308674 -0400
++++ i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c	2016-07-21 02:34:51.047309312 -0400
+@@ -793,20 +793,6 @@
  }
  
+ 
 -static inline void eth_ca_vf_addr(
 -    struct i40e_pf *adapter,
 -    unsigned char *addr,
@@ -19,35 +17,35 @@
 -    addr [5] = vfn & 0xff;
 -}
 -
+-
  /**
   * i40e_reset_vf
   * @vf: pointer to the VF structure
-@@ -832,7 +819,6 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)
- 	u32 reg, reg_idx, bit_idx;
+@@ -821,7 +807,6 @@
  	bool rsd = false;
  	int i;
--	unsigned char vf_mac_addr[6];
- 	
+ 	u32 reg;
+- 	unsigned char vf_mac_addr[6];
+ 
  	if (test_and_set_bit(__I40E_VF_DISABLE, &pf->state))
  		return;
-@@ -889,6 +875,8 @@ void i40e_reset_vf(struct i40e_vf *vf, bool flr)
+@@ -874,6 +859,7 @@
  	reg &= ~I40E_VPGEN_VFRTRIG_VFSWR_MASK;
  	wr32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id), reg);
  
 +	ether_addr_copy(vf->default_lan_addr.addr, vf->default_lan_addr_backup.addr);
-+	
  	/* On initial reset, we won't have any queues */
  	if (vf->lan_vsi_idx == 0)
  		goto complete_reset;
-@@ -984,7 +972,6 @@ int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs)
+@@ -969,7 +955,6 @@
  {
  	struct i40e_vf *vfs;
  	int i, ret = 0;
--	unsigned char vf_mac_addr[6];
+- 	unsigned char vf_mac_addr[6];
  
  	/* Disable interrupt 0 so we don't try to handle the VFLR. */
  	i40e_irq_dynamic_disable_icr0(pf);
-@@ -2540,6 +2527,7 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
+@@ -2171,6 +2156,7 @@
  		goto error_param;
  	}
  	ether_addr_copy(vf->default_lan_addr.addr, mac);
@@ -55,11 +53,9 @@
  	vf->pf_set_mac = true;
  	/* Force the VF driver stop so it has to reload with new MAC address */
  	i40e_vc_disable_vf(pf, vf);
-diff --git a/src/i40e_virtchnl_pf.h b/src/i40e_virtchnl_pf.h
-index 3025654..8e118a9 100644
---- a/src/i40e_virtchnl_pf.h
-+++ b/src/i40e_virtchnl_pf.h
-@@ -85,6 +85,7 @@ struct i40e_vf {
+--- i40e-1.4.25/src/i40e/i40e_virtchnl_pf.h.old	2016-07-21 02:12:48.654308670 -0400
++++ i40e-1.4.25/src/i40e/i40e_virtchnl_pf.h	2016-07-21 02:13:12.227308682 -0400
+@@ -86,6 +86,7 @@
  	u16 stag;
  
  	struct i40e_virtchnl_ether_addr default_lan_addr;
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/fix_intr.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/fix_intr.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/fix_intr.patch	(working copy)
@@ -1,6 +1,6 @@
---- i40e-1.6.42/src/i40e_virtchnl_pf.c.old	2023-05-04 21:06:46.602826377 -0700
-+++ i40e-1.6.42/src/i40e_virtchnl_pf.c	2023-05-04 21:11:26.586440695 -0700
-@@ -242,6 +242,18 @@
+--- i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c.old	2016-06-03 16:26:23.376280353 +0800
++++ i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c	2016-06-03 16:30:08.102280462 +0800
+@@ -242,6 +242,19 @@
  	return pf_queue_id;
  }
  
@@ -16,10 +16,11 @@
 +	i40e_flush(hw);
 +}
 +
++
  /**
   * i40e_config_irq_link_list
   * @vf: pointer to the VF info
-@@ -1616,6 +1628,9 @@
+@@ -1448,6 +1461,9 @@
  			}
  		}
  
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/fix_set_vf_vlan_crash.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/fix_set_vf_vlan_crash.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/fix_set_vf_vlan_crash.patch	(working copy)
@@ -1,89 +0,0 @@
-diff --git a/src/i40e_adminq.c b/src/i40e_adminq.c
-index caf8427..d2235ac 100644
---- a/src/i40e_adminq.c
-+++ b/src/i40e_adminq.c
-@@ -877,8 +877,8 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
- 			 */
- 			if (i40e_asq_done(hw))
- 				break;
--			usleep_range(1000, 2000);
--			total_delay++;
-+			udelay(50);
-+			total_delay += 50;
- 		} while (total_delay < hw->aq.asq_cmd_timeout);
- 	}
- 
-diff --git a/src/i40e_adminq.h b/src/i40e_adminq.h
-index ec5a009..e6739d3 100644
---- a/src/i40e_adminq.h
-+++ b/src/i40e_adminq.h
-@@ -148,7 +148,7 @@ static INLINE int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)
- 
- /* general information */
- #define I40E_AQ_LARGE_BUF	512
--#define I40E_ASQ_CMD_TIMEOUT	250  /* msecs */
-+#define I40E_ASQ_CMD_TIMEOUT	250000  /* usecs */
- 
- void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc,
- 				       u16 opcode);
-diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
-index f325147..f7c2d15 100644
---- a/src/i40e_virtchnl_pf.c
-+++ b/src/i40e_virtchnl_pf.c
-@@ -2518,6 +2518,34 @@ error_param:
- 	return ret;
- }
- 
-+/**
-+ * i40e_vsi_has_vlans - True if VSI has configured VLANs
-+ * @vsi: pointer to the vsi
-+ *
-+ * Check if a VSI has configured any VLANs. False if we have a port VLAN or if
-+ * we have no configured VLANs. Do not call while holding the
-+ * mac_filter_hash_lock.
-+ */
-+static bool i40e_vsi_has_vlans(struct i40e_vsi *vsi)
-+{
-+	bool have_vlans;
-+
-+	/* If we have a port VLAN, then the VSI cannot have any VLANs
-+	 * configured, as all MAC/VLAN filters will be assigned to the PVID.
-+	 */
-+	if (vsi->info.pvid)
-+		return false;
-+
-+	/* Since we don't have a PVID, we know that if the device is in VLAN
-+	 * mode it must be because of a VLAN filter configured on this VSI.
-+	 */
-+	spin_lock_bh(&vsi->mac_filter_hash_lock);
-+	have_vlans = i40e_is_vsi_in_vlan(vsi);
-+	spin_unlock_bh(&vsi->mac_filter_hash_lock);
-+
-+	return have_vlans;
-+}
-+
- #ifdef IFLA_VF_VLAN_INFO_MAX
- /**
-  * i40e_ndo_set_vf_port_vlan
-@@ -2584,10 +2612,7 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
- 		/* duplicate request, so just return success */
- 		goto error_pvid;
- 
--	/* Locked once because multiple functions below iterate list */
--	spin_lock_bh(&vsi->mac_filter_hash_lock);
--
--	if (le16_to_cpu(vsi->info.pvid) == 0 && i40e_is_vsi_in_vlan(vsi)) {
-+	if (i40e_vsi_has_vlans(vsi)) {
- 		dev_err(&pf->pdev->dev,
- 			"VF %d has already configured VLAN filters and the administrator is requesting a port VLAN override.\nPlease unload and reload the VF driver for this change to take effect.\n",
- 			vf_id);
-@@ -2600,6 +2625,9 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
- 		vsi = pf->vsi[vf->lan_vsi_idx];
- 	}
- 
-+	/* Locked once because multiple functions below iterate list */
-+	spin_lock_bh(&vsi->mac_filter_hash_lock);
-+
- 	/* Check for condition where there was already a port VLAN ID
- 	 * filter set and now it is being deleted by setting it to zero.
- 	 * Additionally check for the condition where there was a port
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e-1.4.25.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/x-gzip
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e-1.4.25.tar.gz
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e-1.4.25.tar.gz	(revision 0)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e-1.4.25.tar.gz	(working copy)

Property changes on: 3rdpartyappliance/centos-i40e/SOURCES/i40e-1.4.25.tar.gz
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/x-gzip
\ No newline at end of property
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e-1.6.42.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/x-gzip
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e_vf_promisc.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e_vf_promisc.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/i40e_vf_promisc.patch	(working copy)
@@ -1,8 +1,8 @@
-diff --git a/i40e-1.6.42/src/i40e.h b/i40e-1.6.42/src/i40e.h
-index a72ee19..e46cce1 100644
---- a/i40e-1.6.42/src/i40e.h
-+++ b/i40e-1.6.42/src/i40e.h
-@@ -1142,4 +1142,8 @@ i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf);
+diff --git a/i40e-1.4.25/src/i40e/i40e.h b/i40e-1.4.25/src/i40e/i40e.h
+index 3c377a7..887a429 100644
+--- a/i40e-1.4.25/src/i40e/i40e.h
++++ b/i40e-1.4.25/src/i40e/i40e.h
+@@ -1004,4 +1004,8 @@ i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf);
  i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf);
  i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf);
  void i40e_print_link_message(struct i40e_vsi *vsi, bool isup);
@@ -11,16 +11,16 @@
 +int i40e_ndo_set_vf_trust(struct i40e_pf *pf, int vf_id, bool setting);
 +
  #endif /* _I40E_H_ */
-diff --git a/i40e-1.6.42/src/i40e_debugfs.c b/i40e-1.6.42/src/i40e_debugfs.c
-index c1c23bb..17df827 100644
---- a/i40e-1.6.42/src/i40e_debugfs.c
-+++ b/i40e-1.6.42/src/i40e_debugfs.c
-@@ -85,9 +85,12 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
+diff --git a/i40e-1.4.25/src/i40e/i40e_debugfs.c b/i40e-1.4.25/src/i40e/i40e_debugfs.c
+index 76f8d75..61ca380 100644
+--- a/i40e-1.4.25/src/i40e/i40e_debugfs.c
++++ b/i40e-1.4.25/src/i40e/i40e_debugfs.c
+@@ -88,9 +88,12 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
  {
  	struct i40e_pf *pf = filp->private_data;
  	int bytes_not_copied;
--	size_t buf_size = 256;
-+	size_t buf_size = 1024;
+-	int buf_size = 256;
++	int buf_size = 1024;
  	char *buf;
  	int len;
 +	char trust[256 + 1] = {0};
@@ -29,15 +29,15 @@
  
  	/* don't allow partial reads */
  	if (*ppos != 0)
-@@ -99,9 +102,14 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
+@@ -102,9 +105,14 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
  	if (!buf)
  		return -ENOSPC;
  
 -	len = snprintf(buf, buf_size, "%s: %s\n",
 +	for(; i < pf->num_alloc_vfs; i++){
-+		sprintf(&trust[i], "%d", (int)pf->vf[i].trusted);
-+		sprintf(&promisc[i], "%d", pf->vf[i].pf_set_promisc);
-+	}
++            sprintf(&trust[i], "%d", (int)pf->vf[i].trusted);
++            sprintf(&promisc[i], "%d", pf->vf[i].pf_set_promisc);
++        }
 +
 +	len = snprintf(buf, buf_size, "%s: %s;trust:%s;vf:%s;\n",
  		       pf->vsi[pf->lan_vsi]->netdev->name,
@@ -46,7 +46,7 @@
  
  	bytes_not_copied = copy_to_user(buffer, buf, len);
  	kfree(buf);
-@@ -1094,6 +1102,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
+@@ -917,6 +925,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
  	int veb_seid;
  	int vf_id;
  	int cnt;
@@ -54,156 +54,328 @@
  
  	/* don't allow partial writes */
  	if (*ppos != 0)
-@@ -1300,7 +1309,37 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
+@@ -1203,7 +1212,36 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
  			dev_info(&pf->pdev->dev,
  				 "add pvid: %d to VSI %d failed, ret=%d\n",
  				 vid, vsi_seid, ret);
+-
 +	} else if (strncmp(cmd_buf, "set promisc", 11) == 0){
-+		cnt = sscanf(&cmd_buf[11], "%d %d", &vf_id, &setting);
++	    	cnt = sscanf(&cmd_buf[11], "%d %d", &vf_id, &setting);
 +		if (cnt != 2) {
 +			dev_info(&pf->pdev->dev,
-+				"set promisc: bad command string: %s, vf_if=%d\n",cmd_buf, vf_id);
-+			goto command_write_done;
-+	    }
-+
-+		if(setting !=0 && setting != 1){
-+			dev_info(&pf->pdev->dev,
-+				"set promisc: bad command string: %s, vf_if=%d\n", cmd_buf, vf_id);
++				 "set promisc: bad command string: %s, vf_if=%d\n",cmd_buf, vf_id);
 +			goto command_write_done;
 +		}
-+	       
-+		i40e_set_vf_promisc(pf, vf_id, setting);
- 
++        
++        	if(setting !=0 && setting != 1){
++            		dev_info(&pf->pdev->dev,
++				 "set promisc: bad command string: %s, vf_if=%d\n", cmd_buf, vf_id);
++			goto command_write_done;
++        	}
++        
++	    	i40e_set_vf_promisc(pf, vf_id, setting);
 +	} else if (strncmp(cmd_buf, "set trust", 9) == 0){
-+		cnt = sscanf(&cmd_buf[9], "%d %d", &vf_id, &setting);
++	    	cnt = sscanf(&cmd_buf[9], "%d %d", &vf_id, &setting);
 +		if (cnt != 2) {
 +			dev_info(&pf->pdev->dev,
-+				"set trust: bad command string: %s, vf_if=%d\n", cmd_buf, vf_id);
++				 "set trust: bad command string: %s, vf_if=%d\n", cmd_buf, vf_id);
 +			goto command_write_done;
 +		}
-+	       
-+		if(setting !=0 && setting != 1){
-+			dev_info(&pf->pdev->dev,
-+				"set trust: bad command string: %s, vf_if=%d\n", cmd_buf, vf_id);
++        
++        	if(setting !=0 && setting != 1){
++            		dev_info(&pf->pdev->dev,
++				 "set trust: bad command string: %s, vf_if=%d\n", cmd_buf, vf_id);
 +			goto command_write_done;
-+		}
-+		
-+		i40e_ndo_set_vf_trust(pf, vf_id, (bool)setting);
++        	}
++        
++        	i40e_ndo_set_vf_trust(pf, vf_id, (bool)setting);
  	} else if (strncmp(cmd_buf, "del pvid", 8) == 0) {
  
  		cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid);
-diff --git a/i40e-1.6.42/src/i40e_main.c b/i40e-1.6.42/src/i40e_main.c
-index 51335d8..4432510 100644
---- a/i40e-1.6.42/src/i40e_main.c
-+++ b/i40e-1.6.42/src/i40e_main.c
-@@ -2294,10 +2294,14 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
- 		promisc_changed = true;
- 		vsi->promisc_threshold = 0;
- 	}
-+
- 	/* if the VF is not trusted do not do promisc */
--	if ((vsi->type == I40E_VSI_SRIOV) && !pf->vf[vsi->vf_id].trusted) {
--		clear_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state);
--		goto out;
-+	if((vsi->type == I40E_VSI_SRIOV) && pf->vf[vsi->vf_id].pf_set_promisc != 2){
-+		if ((vsi->type == I40E_VSI_SRIOV) && (!pf->vf[vsi->vf_id].trusted || pf->vf[vsi->vf_id].pf_set_promisc)) {
-+			dev_info(&pf->pdev->dev, "VF %d cannot do promisc due to not promisc or pf has set it\n", vsi->vf_id);
-+			clear_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state);
-+			goto out;
-+		}
+diff --git a/i40e-1.4.25/src/i40e/i40e_main.c b/i40e-1.4.25/src/i40e/i40e_main.c
+index ea7b9c1..8b55e93 100644
+--- a/i40e-1.4.25/src/i40e/i40e_main.c
++++ b/i40e-1.4.25/src/i40e/i40e_main.c
+@@ -2162,6 +2162,15 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
+ 		}
  	}
  
++	/* if the VF is not trusted do not do promisc */
++    	if((vsi->type == I40E_VSI_SRIOV) && pf->vf[vsi->vf_id].pf_set_promisc != 2){
++    		if ((vsi->type == I40E_VSI_SRIOV) && (!pf->vf[vsi->vf_id].trusted || pf->vf[vsi->vf_id].pf_set_promisc)) {
++			dev_info(&pf->pdev->dev, "VF %d cannot do promisc due to not promisc or pf has set it\n", vsi->vf_id);
++    			clear_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state);
++    			goto out;
++    		}
++    	}
++
  	/* check for changes in promiscuous modes */
-diff --git a/i40e-1.6.42/src/i40e_virtchnl_pf.c b/i40e-1.6.42/src/i40e_virtchnl_pf.c
-index 943c4dd..41653a9 100644
---- a/i40e-1.6.42/src/i40e_virtchnl_pf.c
-+++ b/i40e-1.6.42/src/i40e_virtchnl_pf.c
-@@ -1365,9 +1365,9 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf,
- 	struct i40e_mac_filter *f;
+ 	if (changed_flags & IFF_ALLMULTI) {
+ 		bool cur_multipromisc;
+diff --git a/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c b/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c
+index 65a7ee1..220bc4f 100644
+--- a/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c
++++ b/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c
+@@ -1286,6 +1286,25 @@ static void i40e_vc_reset_vf_msg(struct i40e_vf *vf)
+ }
+ 
+ /**
++ * i40e_getnum_vf_vsi_vlan_filters
++ * @vsi: pointer to the vsi
++ *
++ * called to get the number of VLANs offloaded on this VF
++ **/
++static inline int i40e_getnum_vf_vsi_vlan_filters(struct i40e_vsi *vsi)
++{
++	struct i40e_mac_filter *f;
++	int num_vlans = 0;
++
++	list_for_each_entry(f, &vsi->mac_filter_list, list) {
++		if (f->vlan >= 0 && f->vlan <= I40E_MAX_VLANID)
++			num_vlans++;
++	}
++
++	return num_vlans;
++}
++
++/**
+  * i40e_vc_config_promiscuous_mode_msg
+  * @vf: pointer to the VF info
+  * @msg: pointer to the msg buffer
+@@ -1301,22 +1320,133 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf,
+ 	    (struct i40e_virtchnl_promisc_info *)msg;
+ 	struct i40e_pf *pf = vf->pf;
+ 	struct i40e_hw *hw = &pf->hw;
++	struct i40e_mac_filter *f;
++	i40e_status aq_ret = 0;
  	bool allmulti = false;
- 	bool alluni = false;
--	int aq_err = 0;
- 	int bkt;
++	bool alluni = false;
  	struct i40e_vsi *vsi;
+-	i40e_status aq_ret;
 +	int aq_err = 0;
  
  	vsi = i40e_find_vsi_from_id(pf, info->vsi_id);
  	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-@@ -1387,6 +1387,13 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf,
- 		aq_ret = I40E_SUCCESS;
+ 	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
+-	    !i40e_vc_isvalid_vsi_id(vf, info->vsi_id) ||
+-	    (vsi->type != I40E_VSI_FCOE)) {
++	    !i40e_vc_isvalid_vsi_id(vf, info->vsi_id)) {
++	    dev_err(&pf->pdev->dev,
++			"VF %d doesn't meet requirements to enter promiscuous mode\n",
++			vf->vf_id);
+ 		aq_ret = I40E_ERR_PARAM;
  		goto error_param;
  	}
++
 +	/* if the VF is not trusted do not do promisc */
 +	if(vf->pf_set_promisc != 2){
-+		if (!vf->trusted || vf->pf_set_promisc) {
++    		if (!vf->trusted || vf->pf_set_promisc) {
 +			dev_info(&pf->pdev->dev, "VF %d cannot do promisc due to not promisc or pf has set it\n", vf->vf_id);
-+			goto error_param;
-+		}
++    			goto error_param;
++    		}
 +	}
- 	/* Multicast promiscuous handling*/
++
++	/* Multicast promiscuous handling*/
  	if (info->flags & I40E_FLAG_VF_MULTICAST_PROMISC)
  		allmulti = true;
-@@ -1494,6 +1501,55 @@ error_param:
- 				       aq_ret);
- }
- 
-+int i40e_set_vf_promisc(struct i40e_pf *pf, int vf_id, bool setting){
-+	struct i40e_virtchnl_promisc_info info;
-+	struct i40e_vf *vf = NULL;
-+	struct i40e_vsi *vsi = NULL;
-+	bool origin_promsic_flag;
-+	i40e_status ret;
+-	aq_ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
+-						       allmulti, NULL);
 +
-+	if (!pf->num_alloc_vfs) {
-+	dev_info(&pf->pdev->dev, "no VFs allocated\n");
-+		return -ENODEV;
++	if (vf->port_vlan_id) {
++		aq_ret = i40e_aq_set_vsi_mc_promisc_on_vlan(hw, vsi->seid,
++							    allmulti,
++							    vf->port_vlan_id,
++							    NULL);
++	} else if (i40e_getnum_vf_vsi_vlan_filters(vsi)) {
++		list_for_each_entry(f, &vsi->mac_filter_list, list) {
++			if (f->vlan < 0 || f->vlan > I40E_MAX_VLANID)
++				continue;
++			aq_ret = i40e_aq_set_vsi_mc_promisc_on_vlan(hw,
++								    vsi->seid,
++								    allmulti,
++								    f->vlan,
++								    NULL);
++			aq_err = pf->hw.aq.asq_last_status;
++			if (aq_ret) {
++				dev_err(&pf->pdev->dev,
++					"Could not add VLAN %d to multicast promiscuous domain err %s aq_err %s\n",
++					f->vlan,
++					i40e_stat_str(&pf->hw, aq_ret),
++					i40e_aq_str(&pf->hw, aq_err));
++				break;
++			}
++		}
++	} else {
++		aq_ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
++							       allmulti, NULL);
++		aq_err = pf->hw.aq.asq_last_status;
++		if (aq_ret) {
++			dev_err(&pf->pdev->dev,
++				"VF %d failed to set multicast promiscuous mode err %s aq_err %s\n",
++				vf->vf_id,
++				i40e_stat_str(&pf->hw, aq_ret),
++				i40e_aq_str(&pf->hw, aq_err));
++			goto error_param;
++		}
++	}
++
++	if (!aq_ret) {
++		dev_info(&pf->pdev->dev,
++			 "VF %d successfully set multicast promiscuous mode\n",
++			 vf->vf_id);
++		if (allmulti)
++			set_bit(I40E_VF_STAT_MC_PROMISC, &vf->vf_states);
++		else
++			clear_bit(I40E_VF_STAT_MC_PROMISC, &vf->vf_states);
 +	}
 +
-+	if ((vf_id >= 0) && (vf_id < pf->num_alloc_vfs)) {
-+		vf = &pf->vf[vf_id];
-+		vsi = pf->vsi[vf->lan_vsi_idx];
-+		dev_info(&pf->pdev->dev, "vf %2d: VSI id=%d, seid=%d, qps=%d\n",
-+				vf_id, vf->lan_vsi_id, vsi->seid, vf->num_queue_pairs);
++	if (info->flags & I40E_FLAG_VF_UNICAST_PROMISC)
++		alluni = true;
++	if (vf->port_vlan_id) {
++		aq_ret = i40e_aq_set_vsi_uc_promisc_on_vlan(hw, vsi->seid,
++							    alluni,
++							    vf->port_vlan_id,
++							    NULL);
++	} else if (i40e_getnum_vf_vsi_vlan_filters(vsi)) {
++		list_for_each_entry(f, &vsi->mac_filter_list, list) {
++			aq_ret = 0;
++			if (f->vlan >= 0 && f->vlan <= I40E_MAX_VLANID) {
++				aq_ret =
++				i40e_aq_set_vsi_uc_promisc_on_vlan(hw,
++								   vsi->seid,
++								   alluni,
++								   f->vlan,
++								   NULL);
++				aq_err = pf->hw.aq.asq_last_status;
++			}
++			if (aq_ret)
++				dev_err(&pf->pdev->dev,
++					"Could not add VLAN %d to Unicast promiscuous domain err %s aq_err %s\n",
++					f->vlan,
++					i40e_stat_str(&pf->hw, aq_ret),
++					i40e_aq_str(&pf->hw, aq_err));
++		}
 +	} else {
-+		dev_info(&pf->pdev->dev, "invalid VF id %d\n", vf_id);
-+		return -EINVAL;
++		aq_ret = i40e_aq_set_vsi_unicast_promiscuous(hw, vsi->seid,
++							     alluni, NULL);
++		aq_err = pf->hw.aq.asq_last_status;
++		if (aq_ret) {
++			dev_err(&pf->pdev->dev,
++				"VF %d failed to set unicast promiscuous mode %8.8x err %s aq_err %s\n",
++				vf->vf_id, info->flags,
++				i40e_stat_str(&pf->hw, aq_ret),
++				i40e_aq_str(&pf->hw, aq_err));
++			goto error_param;
++		}
 +	}
 +
-+	if(vf->pf_set_promisc == setting){
-+		return 0;
++	if (!aq_ret) {
++		dev_info(&pf->pdev->dev,
++			 "VF %d successfully set unicast promiscuous mode\n",
++			 vf->vf_id);
++		if (alluni)
++			set_bit(I40E_VF_STAT_UC_PROMISC, &vf->vf_states);
++		else
++			clear_bit(I40E_VF_STAT_UC_PROMISC, &vf->vf_states);
 +	}
+ 
+ error_param:
+ 	/* send the response to the VF */
+@@ -1325,6 +1455,54 @@ error_param:
+ 				       aq_ret);
+ }
+ 
++int i40e_set_vf_promisc(struct i40e_pf *pf, int vf_id, bool setting){
++    struct i40e_virtchnl_promisc_info info;
++    struct i40e_vf *vf = NULL;
++    struct i40e_vsi *vsi = NULL;
++    bool origin_promsic_flag;
++    i40e_status ret;
 +
-+	if(setting){
-+		info.flags = I40E_FLAG_VF_UNICAST_PROMISC | I40E_FLAG_VF_MULTICAST_PROMISC;
-+	}else{
-+		info.flags = 0;
-+	}
-+	info.vsi_id = vsi->id;
-+	origin_promsic_flag = vf->pf_set_promisc;
-+	vf->pf_set_promisc = 2;
-+    
-+	i40e_vc_config_promiscuous_mode_msg(vf,(u8 *)&info , sizeof(info));
++    if (!pf->num_alloc_vfs) {
++	dev_info(&pf->pdev->dev, "no VFs allocated\n");
++        return -ENODEV;
++    }
 +
-+	ret = i40e_sync_vsi_filters(vsi);
-+	if (!ret){
-+		vf->pf_set_promisc = setting;
-+		dev_info(&pf->pdev->dev, "VF %d promisc: successful\n", vf_id);
-+	}else{
-+		vf->pf_set_promisc = origin_promsic_flag;
-+		dev_info(&pf->pdev->dev, "VF %d promisc: failed\n", vf_id);
-+	}
++    if ((vf_id >= 0) && (vf_id < pf->num_alloc_vfs)) {
++	vf = &pf->vf[vf_id];
++	vsi = pf->vsi[vf->lan_vsi_idx];
++	dev_info(&pf->pdev->dev, "vf %2d: VSI id=%d, seid=%d, qps=%d\n",
++		 vf_id, vf->lan_vsi_id, vsi->seid, vf->num_queue_pairs);
++    } else {
++	dev_info(&pf->pdev->dev, "invalid VF id %d\n", vf_id);
++        return -EINVAL;
++    }
++
++    if(vf->pf_set_promisc == setting){
++        return 0;
++    }
++
++    if(setting){
++        info.flags = I40E_FLAG_VF_UNICAST_PROMISC | I40E_FLAG_VF_MULTICAST_PROMISC;
++    }else{
++        info.flags = 0;
++    }
++    info.vsi_id = vsi->id;
++    origin_promsic_flag = vf->pf_set_promisc;
++    vf->pf_set_promisc = 2;
++    
++    i40e_vc_config_promiscuous_mode_msg(vf,(u8 *)&info , sizeof(info));
 +
-+	return ret;
++    ret = i40e_sync_vsi_filters(vsi);
++    if (!ret){
++    vf->pf_set_promisc = setting;
++	dev_info(&pf->pdev->dev, "VF %d promisc: successful\n", vf_id);
++    }else{
++	vf->pf_set_promisc = origin_promsic_flag;
++	dev_info(&pf->pdev->dev, "VF %d promisc: failed\n", vf_id);
++    }
++    return ret;
 +}
 +
  /**
   * i40e_vc_config_queues_msg
   * @vf: pointer to the VF info
-@@ -3016,5 +3072,35 @@ int i40e_ndo_set_vf_trust(struct net_device *netdev, int vf_id, bool setting)
- out:
- 	return ret;
+@@ -1781,6 +1959,17 @@ static int i40e_vc_add_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
+ 		/* add new VLAN filter */
+ 		int ret = i40e_vsi_add_vlan(vsi, vfl->vlan_id[i]);
+ 
++        if (test_bit(I40E_VF_STAT_UC_PROMISC, &vf->vf_states))
++			i40e_aq_set_vsi_uc_promisc_on_vlan(&pf->hw, vsi->seid,
++							   true,
++							   vfl->vlan_id[i],
++							   NULL);
++		if (test_bit(I40E_VF_STAT_MC_PROMISC, &vf->vf_states))
++			i40e_aq_set_vsi_mc_promisc_on_vlan(&pf->hw, vsi->seid,
++							   true,
++							   vfl->vlan_id[i],
++							   NULL);
++        
+ 		if (ret)
+ 			dev_err(&pf->pdev->dev,
+ 				"Unable to add VLAN filter %d for VF %d, error %d\n",
+@@ -1833,6 +2022,17 @@ static int i40e_vc_remove_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
+ 	for (i = 0; i < vfl->num_elements; i++) {
+ 		int ret = i40e_vsi_kill_vlan(vsi, vfl->vlan_id[i]);
+ 
++        if (test_bit(I40E_VF_STAT_UC_PROMISC, &vf->vf_states))
++			i40e_aq_set_vsi_uc_promisc_on_vlan(&pf->hw, vsi->seid,
++							   false,
++							   vfl->vlan_id[i],
++							   NULL);
++		if (test_bit(I40E_VF_STAT_MC_PROMISC, &vf->vf_states))
++			i40e_aq_set_vsi_mc_promisc_on_vlan(&pf->hw, vsi->seid,
++							   false,
++							   vfl->vlan_id[i],
++							   NULL);
++
+ 		if (ret)
+ 			dev_err(&pf->pdev->dev,
+ 				"Unable to delete VLAN filter %d for VF %d, error %d\n",
+@@ -2571,4 +2771,38 @@ out:
  }
-+#else
+ #endif /* HAVE_VF_SPOOFCHK_CONFIGURE */
+ 
 +/**
 + * i40e_ndo_set_vf_trust
 + * @netdev: network interface device structure of the pf
@@ -214,36 +386,50 @@
 + **/
 +int i40e_ndo_set_vf_trust(struct i40e_pf *pf, int vf_id, bool setting)
 +{
-+ struct i40e_vf *vf;
-+ /* validate the request */
-+ if (vf_id >= pf->num_alloc_vfs) {
-+   dev_err(&pf->pdev->dev, "Invalid VF Identifier %d\n", vf_id);
-+   return -EINVAL;
-+ }
-+ vf = &pf->vf[vf_id];
-+ if (!vf)
-+   return -EINVAL;
-+ if (setting == vf->trusted)
-+   goto out;
-+ vf->trusted = setting;
-+ i40e_vc_notify_vf_reset(vf);
-+ i40e_reset_vf(vf, false);
-+ dev_info(&pf->pdev->dev, "VF %u is now %strusted\n",
-+    vf_id, setting ? "" : "un");
++	struct i40e_vf *vf;
++
++	/* validate the request */
++	if (vf_id >= pf->num_alloc_vfs) {
++		dev_err(&pf->pdev->dev, "Invalid VF Identifier %d\n", vf_id);
++		return -EINVAL;
++	}
++
++	vf = &pf->vf[vf_id];
++
++	if (!vf)
++		return -EINVAL;
++	if (setting == vf->trusted)
++		goto out;
++
++	vf->trusted = setting;
++	i40e_vc_notify_vf_reset(vf);
++	i40e_reset_vf(vf, false);
++	dev_info(&pf->pdev->dev, "VF %u is now %strusted\n",
++		 vf_id, setting ? "" : "un");
 +out:
-+ return 0;
++	return 0;
 +}
- #endif /* HAVE_NDO_SET_VF_TRUST */
++
  #endif /* IFLA_VF_MAX */
-diff --git a/i40e-1.6.42/src/i40e_virtchnl_pf.h b/i40e-1.6.42/src/i40e_virtchnl_pf.h
-index 8e118a9..b47d840 100644
---- a/i40e-1.6.42/src/i40e_virtchnl_pf.h
-+++ b/i40e-1.6.42/src/i40e_virtchnl_pf.h
-@@ -89,6 +89,7 @@ struct i40e_vf {
+diff --git a/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.h b/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.h
+index bd8e783..200ac39 100644
+--- a/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.h
++++ b/i40e-1.4.25/src/i40e/i40e_virtchnl_pf.h
+@@ -60,6 +60,8 @@ enum i40e_vf_states {
+ 	I40E_VF_STAT_ACTIVE,
+ 	I40E_VF_STAT_FCOEENA,
+ 	I40E_VF_STAT_DISABLED,
++	I40E_VF_STAT_MC_PROMISC,
++	I40E_VF_STAT_UC_PROMISC,
+ };
+ 
+ /* VF capabilities */
+@@ -90,6 +92,8 @@ struct i40e_vf {
  	struct i40e_virtchnl_ether_addr default_fcoe_addr;
  	u16 port_vlan_id;
  	bool pf_set_mac;	/* The VMM admin set the VF MAC address */
 +	int pf_set_promisc; /* The flag PF set promisc */
- 	bool trusted;
++	bool trusted;
  
  	/* VSI indices - actual VSI pointers are maintained in the PF structure
+ 	 * When assigned, these will be non-zero, because VSI 0 is always
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/reinit_mac_when_creating_and_resetting_vf.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/reinit_mac_when_creating_and_resetting_vf.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/reinit_mac_when_creating_and_resetting_vf.patch	(working copy)
@@ -1,9 +1,10 @@
---- i40e-1.6.42/src/i40e_virtchnl_pf.c.old	2023-05-04 02:19:11.847851168 -0700
-+++ i40e-1.6.42/src/i40e_virtchnl_pf.c	2023-05-04 02:28:56.933506922 -0700
-@@ -793,6 +793,19 @@
+--- i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c.old	2016-03-03 23:51:08.000000000 -0500
++++ i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c	2016-03-07 02:23:41.198884170 -0500
+@@ -779,6 +779,21 @@
  	return -EIO;
  }
  
++
 +static inline void eth_ca_vf_addr(
 +    struct i40e_pf *adapter,
 +    unsigned char *addr,
@@ -17,20 +18,19 @@
 +    addr [5] = vfn & 0xff;
 +}
 +
++
  /**
   * i40e_reset_vf
   * @vf: pointer to the VF structure
-@@ -807,7 +820,8 @@
- 	u32 reg, reg_idx, bit_idx;
+@@ -793,6 +808,7 @@
  	bool rsd = false;
  	int i;
--
-+	unsigned char vf_mac_addr[6];
-+	
+ 	u32 reg;
++ 	unsigned char vf_mac_addr[6];
+ 
  	if (test_and_set_bit(__I40E_VF_DISABLE, &pf->state))
  		return;
- 
-@@ -863,6 +877,10 @@
+@@ -845,6 +861,10 @@
  	reg &= ~I40E_VPGEN_VFRTRIG_VFSWR_MASK;
  	wr32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id), reg);
  
@@ -41,15 +41,23 @@
  	/* On initial reset, we won't have any queues */
  	if (vf->lan_vsi_idx == 0)
  		goto complete_reset;
-@@ -958,6 +976,7 @@
+@@ -928,6 +948,7 @@
+ }
+ 
+ #ifdef CONFIG_PCI_IOV
++
+ /**
+  * i40e_alloc_vfs
+  * @pf: pointer to the PF structure
+@@ -939,6 +960,7 @@
  {
  	struct i40e_vf *vfs;
  	int i, ret = 0;
-+	unsigned char vf_mac_addr[6];
++ 	unsigned char vf_mac_addr[6];
  
  	/* Disable interrupt 0 so we don't try to handle the VFLR. */
  	i40e_irq_dynamic_disable_icr0(pf);
-@@ -985,6 +1004,10 @@
+@@ -966,6 +988,10 @@
  		vfs[i].parent_type = I40E_SWITCH_ELEMENT_TYPE_VEB;
  		vfs[i].vf_id = i;
  
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/reuse_mac_after_setting.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/reuse_mac_after_setting.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/reuse_mac_after_setting.patch	(working copy)
@@ -1,6 +1,6 @@
---- i40e-1.6.42/src/i40e_virtchnl_pf.c.old	2023-05-04 21:16:50.519052658 -0700
-+++ i40e-1.6.42/src/i40e_virtchnl_pf.c	2023-05-04 21:18:47.682380478 -0700
-@@ -889,10 +889,6 @@
+--- i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c.old	2016-06-05 22:05:14.239985843 -0400
++++ i40e-1.4.25/src/i40e/i40e_virtchnl_pf.c	2016-06-05 23:15:45.513691400 -0400
+@@ -874,10 +874,6 @@
  	reg &= ~I40E_VPGEN_VFRTRIG_VFSWR_MASK;
  	wr32(hw, I40E_VPGEN_VFRTRIG(vf->vf_id), reg);
  
@@ -11,7 +11,7 @@
  	/* On initial reset, we won't have any queues */
  	if (vf->lan_vsi_idx == 0)
  		goto complete_reset;
-@@ -1016,10 +1012,6 @@
+@@ -1001,10 +997,6 @@
  		vfs[i].parent_type = I40E_SWITCH_ELEMENT_TYPE_VEB;
  		vfs[i].vf_id = i;
  
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/x722_support.patch
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/x722_support.patch	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SOURCES/x722_support.patch	(working copy)
@@ -1,44 +1,56 @@
-diff --git a/src/i40e_common.c b/src/i40e_common.c
-index 49ce425..c79b4c2 100644
---- a/src/i40e_common.c
-+++ b/src/i40e_common.c
-@@ -54,6 +54,7 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
- 		case I40E_DEV_ID_25G_SFP28:
+diff --git a/src/i40e/i40e_common.c b/src/i40e/i40e_common.c
+index 31612ff..fb2614f 100644
+--- a/src/i40e/i40e_common.c
++++ b/src/i40e/i40e_common.c
+@@ -55,11 +55,13 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
+ 		case I40E_DEV_ID_20G_KR2_A:
  			hw->mac.type = I40E_MAC_XL710;
  			break;
 +		case I40E_DEV_ID_X722_A0:
  		case I40E_DEV_ID_KX_X722:
  		case I40E_DEV_ID_QSFP_X722:
  		case I40E_DEV_ID_SFP_X722:
-diff --git a/src/i40e_devids.h b/src/i40e_devids.h
-index 6e5ec29..7b0e5c9 100644
---- a/src/i40e_devids.h
-+++ b/src/i40e_devids.h
-@@ -35,6 +35,7 @@
+ 		case I40E_DEV_ID_1G_BASE_T_X722:
+ 		case I40E_DEV_ID_10G_BASE_T_X722:
++		case I40E_DEV_ID_SFP_I_X722:
+ 			hw->mac.type = I40E_MAC_X722;
+ 			break;
+ 		default:
+diff --git a/src/i40e/i40e_devids.h b/src/i40e/i40e_devids.h
+index 51c0611..48e6f1f 100644
+--- a/src/i40e/i40e_devids.h
++++ b/src/i40e/i40e_devids.h
+@@ -41,11 +41,13 @@
  #define I40E_DEV_ID_20G_KR2		0x1587
  #define I40E_DEV_ID_20G_KR2_A		0x1588
  #define I40E_DEV_ID_10G_BASE_T4		0x1589
 +#define I40E_DEV_ID_X722_A0		0x374C
- #define I40E_DEV_ID_25G_B		0x158A
- #define I40E_DEV_ID_25G_SFP28		0x158B
  #define I40E_DEV_ID_KX_X722		0x37CE
-diff --git a/src/i40e_main.c b/src/i40e_main.c
-index 4432510..38ce42d 100644
---- a/src/i40e_main.c
-+++ b/src/i40e_main.c
-@@ -101,14 +101,13 @@ static const struct pci_device_id i40e_pci_tbl[] = {
+ #define I40E_DEV_ID_QSFP_X722		0x37CF
+ #define I40E_DEV_ID_SFP_X722		0x37D0
+ #define I40E_DEV_ID_1G_BASE_T_X722	0x37D1
+ #define I40E_DEV_ID_10G_BASE_T_X722	0x37D2
++#define I40E_DEV_ID_SFP_I_X722		0x37D3
+ 
+ #define i40e_is_40G_device(d)		((d) == I40E_DEV_ID_QSFP_A  || \
+ 					 (d) == I40E_DEV_ID_QSFP_B  || \
+diff --git a/src/i40e/i40e_main.c b/src/i40e/i40e_main.c
+index 8b55e93..f3b65dc 100644
+--- a/src/i40e/i40e_main.c
++++ b/src/i40e/i40e_main.c
+@@ -122,13 +122,13 @@ static const struct pci_device_id i40e_pci_tbl[] = {
  	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T4), 0},
  	{PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2), 0},
  	{PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2_A), 0},
 -#ifdef X722_DEV_SUPPORT
 +	{PCI_VDEVICE(INTEL, I40E_DEV_ID_X722_A0), 0},
- 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722), 0},
- 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_X722), 0},
  	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X722), 0},
  	{PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_X722), 0},
  	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_X722), 0},
- 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_I_X722), 0},
+ 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722), 0},
+ 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_X722), 0},
 -#endif /* X722_DEV_SUPPORT */
- 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_25G_B), 0},
- 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_25G_SFP28), 0},
++	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_I_X722), 0},
  	/* required last entry */
+ 	{0, }
+ };
Index: /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SPECS/i40e.spec
===================================================================
--- /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SPECS/i40e.spec	(revision 8789)
+++ /branches/rel_avx_2_7_2/3rdpartyappliance/centos-i40e/SPECS/i40e.spec	(working copy)
@@ -1,6 +1,6 @@
 Name: i40e
 Summary: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
-Version: 1.6.42
+Version: 1.4.25
 Release: 11
 Source: %{name}-%{version}.tar.gz
 Vendor: Intel Corporation
@@ -31,8 +31,10 @@
 Patch999008: i40e_vf_promisc.patch
 Patch999009: x722_support.patch
 Patch999010: avx_get_i40e_info_bug77356.patch
-Patch999011: fix_set_vf_vlan_crash.patch
+Patch999011: allow_vlan0_work.patch
+Patch999012: 25G_support.patch
 
+####
 %description
 This package contains the Intel(R) 40-10 Gigabit Ethernet Connection Network Driver.
 
@@ -49,6 +51,7 @@
 %patch999009 -p1
 %patch999010 -p2
 %patch999011 -p1
+%patch999012 -p1
 
 %build
 make -C src clean
Index: /branches/rel_avx_2_7_2/update/avxsystem.ks
===================================================================
--- /branches/rel_avx_2_7_2/update/avxsystem.ks	(revision 8789)
+++ /branches/rel_avx_2_7_2/update/avxsystem.ks	(working copy)
@@ -110,7 +110,7 @@
 bind-libs-lite-9.9.4-29.el7.x86_64
 avx_cli-1.0-2.el7.centos.x86_64
 httpd-tools-2.4.6-40.el7.centos.4.1.x86_64
-i40e-1.4.25-10.x86_64
+i40e-1.4.25-11.x86_64
 flac-libs-1.3.0-5.el7_1.x86_64
 ipmitool-1.8.13-8.el7_1.x86_64
 file-5.11-31.el7.x86_64
