MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_mac_addr_remove_op

Function bnxt_mac_addr_remove_op

dpdk/drivers/net/bnxt/bnxt_ethdev.c:1734–1767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1732}
1733
1734static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
1735 uint32_t index)
1736{
1737 struct bnxt *bp = eth_dev->data->dev_private;
1738 uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
1739 struct bnxt_vnic_info *vnic;
1740 struct bnxt_filter_info *filter, *temp_filter;
1741 uint32_t i;
1742
1743 if (is_bnxt_in_error(bp))
1744 return;
1745
1746 /*
1747 * Loop through all VNICs from the specified filter flow pools to
1748 * remove the corresponding MAC addr filter
1749 */
1750 for (i = 0; i < bp->nr_vnics; i++) {
1751 if (!(pool_mask & (1ULL << i)))
1752 continue;
1753
1754 vnic = &bp->vnic_info[i];
1755 filter = STAILQ_FIRST(&vnic->filter);
1756 while (filter) {
1757 temp_filter = STAILQ_NEXT(filter, next);
1758 if (filter->mac_index == index) {
1759 STAILQ_REMOVE(&vnic->filter, filter,
1760 bnxt_filter_info, next);
1761 bnxt_hwrm_clear_l2_filter(bp, filter);
1762 bnxt_free_filter(bp, filter);
1763 }
1764 filter = temp_filter;
1765 }
1766 }
1767}
1768
1769static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic,
1770 struct rte_ether_addr *mac_addr, uint32_t index,

Callers

nothing calls this directly

Calls 3

is_bnxt_in_errorFunction · 0.85
bnxt_free_filterFunction · 0.85

Tested by

no test coverage detected