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

Function bnxt_promiscuous_enable_op

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

Source from the content-addressed store, hash-verified

1896}
1897
1898static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
1899{
1900 struct bnxt *bp = eth_dev->data->dev_private;
1901 struct bnxt_vnic_info *vnic;
1902 uint32_t old_flags;
1903 int rc;
1904
1905 rc = is_bnxt_in_error(bp);
1906 if (rc)
1907 return rc;
1908
1909 /* Filter settings will get applied when port is started */
1910 if (!eth_dev->data->dev_started)
1911 return 0;
1912
1913 if (bp->vnic_info == NULL)
1914 return 0;
1915
1916 vnic = bnxt_get_default_vnic(bp);
1917
1918 old_flags = vnic->flags;
1919 vnic->flags |= BNXT_VNIC_INFO_PROMISC;
1920 rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);
1921 if (rc != 0)
1922 vnic->flags = old_flags;
1923
1924 return rc;
1925}
1926
1927static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)
1928{

Callers 1

bnxt_restore_filtersFunction · 0.85

Calls 3

is_bnxt_in_errorFunction · 0.85
bnxt_get_default_vnicFunction · 0.85

Tested by

no test coverage detected