| 1896 | } |
| 1897 | |
| 1898 | static 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 | |
| 1927 | static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) |
| 1928 | { |
no test coverage detected