Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2016-08-18

This series contains updates to i40e and i40evf only.

Wei Yongjun updates i40e to use list_move() instead of list_del() &
list_add() operations.

Anjali fixes an issue where the client->open call was not protected with
the client instance mutex, which allowed client->close to be called before
the open all completed.

Catherine makes sure that the VLAN count (and stats) gets reset to 0
after reset.

Jake provides two patches, first adds the needed rtnl lock around
i40evf_set_interrupt_capability() since i40evf_init_task() does not
hold the rtnl_lock. Second fixes an issue where users could reduce
the number of channels (queues) below the current flow director
filter rules targets.

Dave fixes a problem where a static analysis tool generates a warning
so eliminating the irrelevant check and redundant assignment for the
value of enabled_tc.

Avinash fixes an sync issue where the iWARP device open is called
before the PCI register writes are completed, so ensure the register
writes complete before exiting the setup function.

Alan fixes a bug which causes RSS to continue to work after being
disabled.

Carolyn implements a feature change which allows using ethtool to set
RDD hash options using less than four parameters if desired.

Dan Carpenter cleans up a stray unlock.

Sridhar exposes the "trust" flag to userspace via ndo_get_vf_config().
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+199 -90
-3
drivers/net/ethernet/intel/i40e/i40e.h
··· 586 586 587 587 /* VSI specific handlers */ 588 588 irqreturn_t (*irq_handler)(int irq, void *data); 589 - 590 - /* current rxnfc data */ 591 - struct ethtool_rxnfc rxnfc; /* current rss hash opts */ 592 589 } ____cacheline_internodealigned_in_smp; 593 590 594 591 struct i40e_netdev_priv {
+5 -4
drivers/net/ethernet/intel/i40e/i40e_client.c
··· 541 541 client->name, pf->hw.pf_id, 542 542 pf->hw.bus.device, pf->hw.bus.func); 543 543 544 + mutex_lock(&i40e_client_instance_mutex); 544 545 /* Send an Open request to the client */ 545 546 atomic_inc(&cdev->ref_cnt); 546 547 if (client->ops && client->ops->open) ··· 555 554 atomic_dec(&client->ref_cnt); 556 555 continue; 557 556 } 557 + mutex_unlock(&i40e_client_instance_mutex); 558 558 } 559 559 mutex_unlock(&i40e_client_mutex); 560 560 } ··· 664 662 client->name, pf->hw.pf_id); 665 663 } 666 664 /* delete the client instance from the list */ 667 - list_del(&cdev->list); 668 - list_add(&cdev->list, &cdevs_tmp); 665 + list_move(&cdev->list, &cdevs_tmp); 669 666 atomic_dec(&client->ref_cnt); 670 667 dev_info(&pf->pdev->dev, "Deleted client instance of Client %s\n", 671 668 client->name); ··· 793 792 wr32(hw, I40E_PFINT_AEQCTL, reg); 794 793 } 795 794 } 796 - 795 + /* Mitigate sync problems with iwarp VF driver */ 796 + i40e_flush(hw); 797 797 return 0; 798 798 err: 799 799 kfree(ldev->qvlist_info); ··· 992 990 if (!i40e_client_is_registered(client)) { 993 991 pr_info("i40e: Client %s has not been registered\n", 994 992 client->name); 995 - mutex_unlock(&i40e_client_mutex); 996 993 ret = -ENODEV; 997 994 goto out; 998 995 }
+152 -76
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
··· 2141 2141 **/ 2142 2142 static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd) 2143 2143 { 2144 + struct i40e_hw *hw = &pf->hw; 2145 + u8 flow_pctype = 0; 2146 + u64 i_set = 0; 2147 + 2144 2148 cmd->data = 0; 2145 2149 2146 - if (pf->vsi[pf->lan_vsi]->rxnfc.data != 0) { 2147 - cmd->data = pf->vsi[pf->lan_vsi]->rxnfc.data; 2148 - cmd->flow_type = pf->vsi[pf->lan_vsi]->rxnfc.flow_type; 2149 - return 0; 2150 - } 2151 - /* Report default options for RSS on i40e */ 2152 2150 switch (cmd->flow_type) { 2153 2151 case TCP_V4_FLOW: 2152 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP; 2153 + break; 2154 2154 case UDP_V4_FLOW: 2155 - cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; 2156 - /* fall through to add IP fields */ 2155 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; 2156 + break; 2157 + case TCP_V6_FLOW: 2158 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_TCP; 2159 + break; 2160 + case UDP_V6_FLOW: 2161 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_UDP; 2162 + break; 2157 2163 case SCTP_V4_FLOW: 2158 2164 case AH_ESP_V4_FLOW: 2159 2165 case AH_V4_FLOW: 2160 2166 case ESP_V4_FLOW: 2161 2167 case IPV4_FLOW: 2162 - cmd->data |= RXH_IP_SRC | RXH_IP_DST; 2163 - break; 2164 - case TCP_V6_FLOW: 2165 - case UDP_V6_FLOW: 2166 - cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; 2167 - /* fall through to add IP fields */ 2168 2168 case SCTP_V6_FLOW: 2169 2169 case AH_ESP_V6_FLOW: 2170 2170 case AH_V6_FLOW: 2171 2171 case ESP_V6_FLOW: 2172 2172 case IPV6_FLOW: 2173 + /* Default is src/dest for IP, no matter the L4 hashing */ 2173 2174 cmd->data |= RXH_IP_SRC | RXH_IP_DST; 2174 2175 break; 2175 2176 default: 2176 2177 return -EINVAL; 2178 + } 2179 + 2180 + /* Read flow based hash input set register */ 2181 + if (flow_pctype) { 2182 + i_set = (u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, 2183 + flow_pctype)) | 2184 + ((u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, 2185 + flow_pctype)) << 32); 2186 + } 2187 + 2188 + /* Process bits of hash input set */ 2189 + if (i_set) { 2190 + if (i_set & I40E_L4_SRC_MASK) 2191 + cmd->data |= RXH_L4_B_0_1; 2192 + if (i_set & I40E_L4_DST_MASK) 2193 + cmd->data |= RXH_L4_B_2_3; 2194 + 2195 + if (cmd->flow_type == TCP_V4_FLOW || 2196 + cmd->flow_type == UDP_V4_FLOW) { 2197 + if (i_set & I40E_L3_SRC_MASK) 2198 + cmd->data |= RXH_IP_SRC; 2199 + if (i_set & I40E_L3_DST_MASK) 2200 + cmd->data |= RXH_IP_DST; 2201 + } else if (cmd->flow_type == TCP_V6_FLOW || 2202 + cmd->flow_type == UDP_V6_FLOW) { 2203 + if (i_set & I40E_L3_V6_SRC_MASK) 2204 + cmd->data |= RXH_IP_SRC; 2205 + if (i_set & I40E_L3_V6_DST_MASK) 2206 + cmd->data |= RXH_IP_DST; 2207 + } 2177 2208 } 2178 2209 2179 2210 return 0; ··· 2349 2318 } 2350 2319 2351 2320 /** 2321 + * i40e_get_rss_hash_bits - Read RSS Hash bits from register 2322 + * @nfc: pointer to user request 2323 + * @i_setc bits currently set 2324 + * 2325 + * Returns value of bits to be set per user request 2326 + **/ 2327 + static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc) 2328 + { 2329 + u64 i_set = i_setc; 2330 + u64 src_l3 = 0, dst_l3 = 0; 2331 + 2332 + if (nfc->data & RXH_L4_B_0_1) 2333 + i_set |= I40E_L4_SRC_MASK; 2334 + else 2335 + i_set &= ~I40E_L4_SRC_MASK; 2336 + if (nfc->data & RXH_L4_B_2_3) 2337 + i_set |= I40E_L4_DST_MASK; 2338 + else 2339 + i_set &= ~I40E_L4_DST_MASK; 2340 + 2341 + if (nfc->flow_type == TCP_V6_FLOW || nfc->flow_type == UDP_V6_FLOW) { 2342 + src_l3 = I40E_L3_V6_SRC_MASK; 2343 + dst_l3 = I40E_L3_V6_DST_MASK; 2344 + } else if (nfc->flow_type == TCP_V4_FLOW || 2345 + nfc->flow_type == UDP_V4_FLOW) { 2346 + src_l3 = I40E_L3_SRC_MASK; 2347 + dst_l3 = I40E_L3_DST_MASK; 2348 + } else { 2349 + /* Any other flow type are not supported here */ 2350 + return i_set; 2351 + } 2352 + 2353 + if (nfc->data & RXH_IP_SRC) 2354 + i_set |= src_l3; 2355 + else 2356 + i_set &= ~src_l3; 2357 + if (nfc->data & RXH_IP_DST) 2358 + i_set |= dst_l3; 2359 + else 2360 + i_set &= ~dst_l3; 2361 + 2362 + return i_set; 2363 + } 2364 + 2365 + /** 2352 2366 * i40e_set_rss_hash_opt - Enable/Disable flow types for RSS hash 2353 2367 * @pf: pointer to the physical function struct 2354 2368 * @cmd: ethtool rxnfc command ··· 2405 2329 struct i40e_hw *hw = &pf->hw; 2406 2330 u64 hena = (u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0)) | 2407 2331 ((u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1)) << 32); 2332 + u8 flow_pctype = 0; 2333 + u64 i_set, i_setc; 2408 2334 2409 2335 /* RSS does not support anything other than hashing 2410 2336 * to queues on src and dst IPs and ports ··· 2415 2337 RXH_L4_B_0_1 | RXH_L4_B_2_3)) 2416 2338 return -EINVAL; 2417 2339 2418 - /* We need at least the IP SRC and DEST fields for hashing */ 2419 - if (!(nfc->data & RXH_IP_SRC) || 2420 - !(nfc->data & RXH_IP_DST)) 2421 - return -EINVAL; 2422 - 2423 2340 switch (nfc->flow_type) { 2424 2341 case TCP_V4_FLOW: 2425 - switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) { 2426 - case 0: 2427 - return -EINVAL; 2428 - case (RXH_L4_B_0_1 | RXH_L4_B_2_3): 2429 - if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2430 - hena |= 2431 - BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK); 2432 - 2433 - hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP); 2434 - break; 2435 - default: 2436 - return -EINVAL; 2437 - } 2342 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP; 2343 + if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2344 + hena |= 2345 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK); 2438 2346 break; 2439 2347 case TCP_V6_FLOW: 2440 - switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) { 2441 - case 0: 2442 - return -EINVAL; 2443 - case (RXH_L4_B_0_1 | RXH_L4_B_2_3): 2444 - if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2445 - hena |= 2446 - BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK); 2447 - 2448 - hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP); 2449 - break; 2450 - default: 2451 - return -EINVAL; 2452 - } 2348 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_TCP; 2349 + if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2350 + hena |= 2351 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK); 2352 + if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2353 + hena |= 2354 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK); 2453 2355 break; 2454 2356 case UDP_V4_FLOW: 2455 - switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) { 2456 - case 0: 2457 - return -EINVAL; 2458 - case (RXH_L4_B_0_1 | RXH_L4_B_2_3): 2459 - if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2460 - hena |= 2461 - BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | 2462 - BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP); 2357 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; 2358 + if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2359 + hena |= 2360 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | 2361 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP); 2463 2362 2464 - hena |= (BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | 2465 - BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4)); 2466 - break; 2467 - default: 2468 - return -EINVAL; 2469 - } 2363 + hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4); 2470 2364 break; 2471 2365 case UDP_V6_FLOW: 2472 - switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) { 2473 - case 0: 2474 - return -EINVAL; 2475 - case (RXH_L4_B_0_1 | RXH_L4_B_2_3): 2476 - if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2477 - hena |= 2478 - BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | 2479 - BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP); 2366 + flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_UDP; 2367 + if (pf->flags & I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE) 2368 + hena |= 2369 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | 2370 + BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP); 2480 2371 2481 - hena |= (BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | 2482 - BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6)); 2483 - break; 2484 - default: 2485 - return -EINVAL; 2486 - } 2372 + hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6); 2487 2373 break; 2488 2374 case AH_ESP_V4_FLOW: 2489 2375 case AH_V4_FLOW: ··· 2479 2437 return -EINVAL; 2480 2438 } 2481 2439 2440 + if (flow_pctype) { 2441 + i_setc = (u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, 2442 + flow_pctype)) | 2443 + ((u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, 2444 + flow_pctype)) << 32); 2445 + i_set = i40e_get_rss_hash_bits(nfc, i_setc); 2446 + i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, flow_pctype), 2447 + (u32)i_set); 2448 + i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, flow_pctype), 2449 + (u32)(i_set >> 32)); 2450 + hena |= BIT_ULL(flow_pctype); 2451 + } 2452 + 2482 2453 i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (u32)hena); 2483 2454 i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32)); 2484 2455 i40e_flush(hw); 2485 - 2486 - /* Save setting for future output/update */ 2487 - pf->vsi[pf->lan_vsi]->rxnfc = *nfc; 2488 2456 2489 2457 return 0; 2490 2458 } ··· 2796 2744 static int i40e_set_channels(struct net_device *dev, 2797 2745 struct ethtool_channels *ch) 2798 2746 { 2747 + const u8 drop = I40E_FILTER_PROGRAM_DESC_DEST_DROP_PACKET; 2799 2748 struct i40e_netdev_priv *np = netdev_priv(dev); 2800 2749 unsigned int count = ch->combined_count; 2801 2750 struct i40e_vsi *vsi = np->vsi; 2802 2751 struct i40e_pf *pf = vsi->back; 2752 + struct i40e_fdir_filter *rule; 2753 + struct hlist_node *node2; 2803 2754 int new_count; 2755 + int err = 0; 2804 2756 2805 2757 /* We do not support setting channels for any other VSI at present */ 2806 2758 if (vsi->type != I40E_VSI_MAIN) ··· 2821 2765 /* verify the number of channels does not exceed hardware limits */ 2822 2766 if (count > i40e_max_channels(vsi)) 2823 2767 return -EINVAL; 2768 + 2769 + /* verify that the number of channels does not invalidate any current 2770 + * flow director rules 2771 + */ 2772 + hlist_for_each_entry_safe(rule, node2, 2773 + &pf->fdir_filter_list, fdir_node) { 2774 + if (rule->dest_ctl != drop && count <= rule->q_index) { 2775 + dev_warn(&pf->pdev->dev, 2776 + "Existing user defined filter %d assigns flow to queue %d\n", 2777 + rule->fd_id, rule->q_index); 2778 + err = -EINVAL; 2779 + } 2780 + } 2781 + 2782 + if (err) { 2783 + dev_err(&pf->pdev->dev, 2784 + "Existing filter rules must be deleted to reduce combined channel count to %d\n", 2785 + count); 2786 + return err; 2787 + } 2824 2788 2825 2789 /* update feature limits from largest to smallest supported values */ 2826 2790 /* TODO: Flow director limit, DCB etc */
+31 -4
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 41 41 42 42 #define DRV_VERSION_MAJOR 1 43 43 #define DRV_VERSION_MINOR 6 44 - #define DRV_VERSION_BUILD 11 44 + #define DRV_VERSION_BUILD 12 45 45 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 46 46 __stringify(DRV_VERSION_MINOR) "." \ 47 47 __stringify(DRV_VERSION_BUILD) DRV_KERN ··· 527 527 pf->veb[i]->stat_offsets_loaded = false; 528 528 } 529 529 } 530 + pf->hw_csum_rx_error = 0; 530 531 } 531 532 532 533 /** ··· 4617 4616 static u8 i40e_pf_get_num_tc(struct i40e_pf *pf) 4618 4617 { 4619 4618 struct i40e_hw *hw = &pf->hw; 4620 - u8 i, enabled_tc; 4619 + u8 i, enabled_tc = 1; 4621 4620 u8 num_tc = 0; 4622 4621 struct i40e_dcbx_config *dcbcfg = &hw->local_dcbx_config; 4623 4622 ··· 4635 4634 else 4636 4635 return 1; /* Only TC0 */ 4637 4636 4638 - /* At least have TC0 */ 4639 - enabled_tc = (enabled_tc ? enabled_tc : 0x1); 4640 4637 for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { 4641 4638 if (enabled_tc & BIT(i)) 4642 4639 num_tc++; ··· 8691 8692 } 8692 8693 8693 8694 /** 8695 + * i40e_clear_rss_lut - clear the rx hash lookup table 8696 + * @vsi: the VSI being configured 8697 + **/ 8698 + static void i40e_clear_rss_lut(struct i40e_vsi *vsi) 8699 + { 8700 + struct i40e_pf *pf = vsi->back; 8701 + struct i40e_hw *hw = &pf->hw; 8702 + u16 vf_id = vsi->vf_id; 8703 + u8 i; 8704 + 8705 + if (vsi->type == I40E_VSI_MAIN) { 8706 + for (i = 0; i <= I40E_PFQF_HLUT_MAX_INDEX; i++) 8707 + wr32(hw, I40E_PFQF_HLUT(i), 0); 8708 + } else if (vsi->type == I40E_VSI_SRIOV) { 8709 + for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) 8710 + i40e_write_rx_ctl(hw, I40E_VFQF_HLUT1(i, vf_id), 0); 8711 + } else { 8712 + dev_err(&pf->pdev->dev, "Cannot set RSS LUT - invalid VSI type\n"); 8713 + } 8714 + } 8715 + 8716 + /** 8694 8717 * i40e_set_features - set the netdev feature flags 8695 8718 * @netdev: ptr to the netdev being adjusted 8696 8719 * @features: the feature set that the stack is suggesting ··· 8724 8703 struct i40e_vsi *vsi = np->vsi; 8725 8704 struct i40e_pf *pf = vsi->back; 8726 8705 bool need_reset; 8706 + 8707 + if (features & NETIF_F_RXHASH && !(netdev->features & NETIF_F_RXHASH)) 8708 + i40e_pf_config_rss(pf); 8709 + else if (!(features & NETIF_F_RXHASH) && 8710 + netdev->features & NETIF_F_RXHASH) 8711 + i40e_clear_rss_lut(vsi); 8727 8712 8728 8713 if (features & NETIF_F_HW_VLAN_CTAG_RX) 8729 8714 i40e_vlan_stripping_enable(vsi);
+8 -2
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
··· 991 991 i40e_enable_vf_mappings(vf); 992 992 set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states); 993 993 clear_bit(I40E_VF_STAT_DISABLED, &vf->vf_states); 994 - i40e_notify_client_of_vf_reset(pf, abs_vf_id); 994 + /* Do not notify the client during VF init */ 995 + if (vf->pf->num_alloc_vfs) 996 + i40e_notify_client_of_vf_reset(pf, abs_vf_id); 997 + vf->num_vlan = 0; 995 998 } 996 999 /* tell the VF the reset is done */ 997 1000 wr32(hw, I40E_VFGEN_RSTAT1(vf->vf_id), I40E_VFR_VFACTIVE); ··· 1092 1089 goto err_iov; 1093 1090 } 1094 1091 } 1095 - i40e_notify_client_of_vf_enable(pf, num_alloc_vfs); 1096 1092 /* allocate memory */ 1097 1093 vfs = kcalloc(num_alloc_vfs, sizeof(struct i40e_vf), GFP_KERNEL); 1098 1094 if (!vfs) { ··· 1114 1112 1115 1113 } 1116 1114 pf->num_alloc_vfs = num_alloc_vfs; 1115 + 1116 + i40e_notify_client_of_vf_enable(pf, num_alloc_vfs); 1117 1117 1118 1118 err_alloc: 1119 1119 if (ret) ··· 2318 2314 /* send the response back to the VF */ 2319 2315 aq_ret = i40e_vc_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS, 2320 2316 aq_ret, (u8 *)vrh, len); 2317 + kfree(vrh); 2321 2318 return aq_ret; 2322 2319 } 2323 2320 ··· 3000 2995 else 3001 2996 ivi->linkstate = IFLA_VF_LINK_STATE_DISABLE; 3002 2997 ivi->spoofchk = vf->spoofchk; 2998 + ivi->trusted = vf->trusted; 3003 2999 ret = 0; 3004 3000 3005 3001 error_param:
+3 -1
drivers/net/ethernet/intel/i40evf/i40evf_main.c
··· 38 38 39 39 #define DRV_VERSION_MAJOR 1 40 40 #define DRV_VERSION_MINOR 6 41 - #define DRV_VERSION_BUILD 11 41 + #define DRV_VERSION_BUILD 12 42 42 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 43 43 __stringify(DRV_VERSION_MINOR) "." \ 44 44 __stringify(DRV_VERSION_BUILD) \ ··· 1420 1420 { 1421 1421 int err; 1422 1422 1423 + rtnl_lock(); 1423 1424 err = i40evf_set_interrupt_capability(adapter); 1425 + rtnl_unlock(); 1424 1426 if (err) { 1425 1427 dev_err(&adapter->pdev->dev, 1426 1428 "Unable to setup interrupt capabilities\n");