update Intel copyright years to 2014
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe_pf.c
index 903ad1e..07202d4 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
 
 #define IXGBE_MAX_VFTA     (128)
 
-static inline 
-void eth_random_addr(uint8_t *addr)
-{
-       uint64_t rand = rte_rand();
-       uint8_t *p = (uint8_t*)&rand;
-
-       rte_memcpy(addr, p, ETHER_ADDR_LEN);
-       addr[0] &= 0xfe;        /* clear multicast bit */
-       addr[0] |= 0x02;        /* set local assignment bit (IEEE802) */
-}
-
 static inline uint16_t
 dev_num_vf(struct rte_eth_dev *eth_dev)
 {
@@ -104,6 +93,10 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 {
        struct ixgbe_vf_info **vfinfo = 
                IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
+       struct ixgbe_mirror_info *mirror_info =
+        IXGBE_DEV_PRIVATE_TO_PFDATA(eth_dev->data->dev_private);
+       struct ixgbe_uta_info *uta_info =
+        IXGBE_DEV_PRIVATE_TO_UTA(eth_dev->data->dev_private);
        struct ixgbe_hw *hw = 
                IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
        uint16_t vf_num;
@@ -119,6 +112,10 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
        if (*vfinfo == NULL)
                rte_panic("Cannot allocate memory for private VF data\n");
 
+       memset(mirror_info,0,sizeof(struct ixgbe_mirror_info));
+       memset(uta_info,0,sizeof(struct ixgbe_uta_info));
+       hw->mac.mc_filter_type = 0;
+
        if (vf_num >= ETH_32_POOLS) {
                nb_queue = 2;
                RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_64_POOLS;
@@ -266,8 +263,6 @@ set_rx_mode(struct rte_eth_dev *dev)
        if (dev_data->promiscuous) {
                fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
                vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_MPE);
-               /* don't hardware filter vlans in promisc mode */
-               ixgbe_vlan_hw_filter_disable(dev);
        } else {
                if (dev_data->all_multicast) {
                        fctrl |= IXGBE_FCTRL_MPE;
@@ -275,7 +270,6 @@ set_rx_mode(struct rte_eth_dev *dev)
                } else {
                        vmolr |= IXGBE_VMOLR_ROMPE;
                }
-               ixgbe_vlan_hw_filter_enable(dev);
        }
 
        if (hw->mac.type != ixgbe_mac_82598EB) {