ixgbe/base: source address pruning
authorOuyang Changchun <changchun.ouyang@intel.com>
Tue, 7 Oct 2014 12:43:35 +0000 (14:43 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 7 Oct 2014 14:51:59 +0000 (16:51 +0200)
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h

index 7ad8eda..787c4d9 100644 (file)
@@ -1096,6 +1096,19 @@ s32 ixgbe_setup_eee(struct ixgbe_hw *hw, bool enable_eee)
                        IXGBE_NOT_IMPLEMENTED);
 }
 
+/**
+ * ixgbe_set_source_address_pruning - Enable/Disable source address pruning
+ * @hw: pointer to hardware structure
+ * @enbale: enable or disable source address pruning
+ * @pool: Rx pool - Rx pool to toggle source address pruning
+ **/
+void ixgbe_set_source_address_pruning(struct ixgbe_hw *hw, bool enable,
+                                     unsigned int pool)
+{
+       if (hw->mac.ops.set_source_address_pruning)
+               hw->mac.ops.set_source_address_pruning(hw, enable, pool);
+}
+
 /**
  *  ixgbe_read_analog_reg8 - Reads 8 bit analog register
  *  @hw: pointer to hardware structure
index 88a8ca0..dfbe452 100644 (file)
@@ -183,6 +183,8 @@ s32 ixgbe_dmac_config(struct ixgbe_hw *hw);
 s32 ixgbe_dmac_update_tcs(struct ixgbe_hw *hw);
 s32 ixgbe_dmac_config_tcs(struct ixgbe_hw *hw);
 s32 ixgbe_setup_eee(struct ixgbe_hw *hw, bool enable_eee);
+void ixgbe_set_source_address_pruning(struct ixgbe_hw *hw, bool enable,
+                                     unsigned int vf);
 void ixgbe_disable_rx(struct ixgbe_hw *hw);
 void ixgbe_enable_rx(struct ixgbe_hw *hw);
 
index f30ce39..826c39d 100644 (file)
@@ -3252,6 +3252,8 @@ struct ixgbe_mac_operations {
        void (*get_rtrup2tc)(struct ixgbe_hw *hw, u8 *map);
        s32 (*setup_eee)(struct ixgbe_hw *hw, bool enable_eee);
        void (*set_ethertype_anti_spoofing)(struct ixgbe_hw *, bool, int);
+       void (*set_source_address_pruning)(struct ixgbe_hw *, bool,
+                                          unsigned int);
        void (*disable_rx)(struct ixgbe_hw *hw);
        void (*enable_rx)(struct ixgbe_hw *hw);
 };