| 2772 | } |
| 2773 | |
| 2774 | static int |
| 2775 | bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask) |
| 2776 | { |
| 2777 | uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads; |
| 2778 | struct bnxt *bp = dev->data->dev_private; |
| 2779 | int rc; |
| 2780 | |
| 2781 | rc = is_bnxt_in_error(bp); |
| 2782 | if (rc) |
| 2783 | return rc; |
| 2784 | |
| 2785 | /* Filter settings will get applied when port is started */ |
| 2786 | if (!dev->data->dev_started) |
| 2787 | return 0; |
| 2788 | |
| 2789 | if (mask & RTE_ETH_VLAN_FILTER_MASK) { |
| 2790 | /* Enable or disable VLAN filtering */ |
| 2791 | rc = bnxt_config_vlan_hw_filter(bp, rx_offloads); |
| 2792 | if (rc) |
| 2793 | return rc; |
| 2794 | } |
| 2795 | |
| 2796 | if (mask & RTE_ETH_VLAN_STRIP_MASK) { |
| 2797 | /* Enable or disable VLAN stripping */ |
| 2798 | rc = bnxt_config_vlan_hw_stripping(bp, rx_offloads); |
| 2799 | if (rc) |
| 2800 | return rc; |
| 2801 | } |
| 2802 | |
| 2803 | if (mask & RTE_ETH_VLAN_EXTEND_MASK) { |
| 2804 | if (rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND) |
| 2805 | PMD_DRV_LOG(DEBUG, "Extend VLAN supported\n"); |
| 2806 | else |
| 2807 | PMD_DRV_LOG(INFO, "Extend VLAN unsupported\n"); |
| 2808 | } |
| 2809 | |
| 2810 | return 0; |
| 2811 | } |
| 2812 | |
| 2813 | static int |
| 2814 | bnxt_vlan_tpid_set_op(struct rte_eth_dev *dev, enum rte_vlan_type vlan_type, |
no test coverage detected