components/openvswitch/files/lib/netdev-solaris.c
changeset 7000 22f549e6467a
parent 6656 754a6f28f94e
child 7590 5461fab14904
equal deleted inserted replaced
6999:1238e930f8af 7000:22f549e6467a
   816 	    curr_lower, sizeof (curr_lower));
   816 	    curr_lower, sizeof (curr_lower));
   817 	VLOG_DBG("netdev_solaris_configure_uplink lower-link:%s", curr_lower);
   817 	VLOG_DBG("netdev_solaris_configure_uplink lower-link:%s", curr_lower);
   818 
   818 
   819 	if (error == ENODEV) {
   819 	if (error == ENODEV) {
   820 		/*
   820 		/*
   821 		 * No implicit VNIC being created yet, create it now
   821 		 * No implicit VNIC exists, create it now first over
       
   822 		 * NETDEV_IMPL_ETHERSTUB and later migrate onto new_uplink. Not
       
   823 		 * creating it directly over new_uplink as it may fail(for vnet)
       
   824 		 * if it doesn't support creating vnic with "auto" mac-addr-type
   822 		 */
   825 		 */
   823 		VLOG_DBG("%s vnic being created on %s", brname, new_uplink);
   826 		VLOG_DBG("%s vnic being created on %s", brname,
   824 		error = solaris_create_vnic(new_uplink, brname);
   827 		    NETDEV_IMPL_ETHERSTUB);
       
   828 		error = solaris_create_vnic(NETDEV_IMPL_ETHERSTUB, brname);
   825 		if (error == 0) {
   829 		if (error == 0) {
   826 			(void) strlcpy(netdev->brname, brname,
   830 			VLOG_DBG("%s vnic is being migrated on %s", brname,
   827 			    sizeof (netdev->brname));
   831 			    new_uplink);
       
   832 			error = solaris_modify_vnic(new_uplink, brname);
       
   833 			if (error == 0) {
       
   834 				(void) strlcpy(netdev->brname, brname,
       
   835 				    sizeof (netdev->brname));
       
   836 			} else {
       
   837 				VLOG_ERR("Failed to migrate %s vnic over %s:%s",
       
   838 				    brname, new_uplink, ovs_strerror(error));
       
   839 			}
   828 		} else {
   840 		} else {
   829 			VLOG_ERR("Failed to create vnic for %s: %s",
   841 			VLOG_ERR("Failed to create vnic for %s: %s",
   830 			    brname, ovs_strerror(error));
   842 			    brname, ovs_strerror(error));
   831 		}
   843 		}
   832 		goto exit;
   844 		goto exit;