X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Fi40e_ethdev_vf.c;h=dc076ae5522a4892f2e5171c3fafcac2bd2ad5c2;hb=ecf1474a618ba77ef3c4471fdc004a8c5f3b4d11;hp=6e6eef5a6a1ee96f884a78e76c5733f8d9af2b44;hpb=99e47bbe4c074c879bbe5d2c316754859fa00912;p=dpdk.git diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 6e6eef5a6a..dc076ae552 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -260,7 +260,7 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data) case VIRTCHNL_EVENT_RESET_IMPENDING: vf->vf_reset = true; vf->pend_msg |= PFMSG_RESET_IMPENDING; - PMD_DRV_LOG(INFO, "vf is reseting"); + PMD_DRV_LOG(INFO, "VF is resetting"); break; case VIRTCHNL_EVENT_PF_DRIVER_CLOSE: vf->dev_closed = true; @@ -1078,8 +1078,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid) args.out_buffer = vf->aq_resp; args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); - if (err) + if (err) { PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN"); + return err; + } + /** + * In linux kernel driver on receiving ADD_VLAN it enables + * VLAN_STRIP by default. So reconfigure the vlan_offload + * as it was done by the app earlier. + */ + err = i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); + if (err) + PMD_DRV_LOG(ERR, "fail to set vlan_strip"); return err; } @@ -2406,6 +2416,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->imissed = pstats->rx_discards; stats->oerrors = pstats->tx_errors + pstats->tx_discards; stats->ibytes = pstats->rx_bytes; + stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN; stats->obytes = pstats->tx_bytes; } else { PMD_DRV_LOG(ERR, "Get statistics failed");