* DPDK callback to Configure VLAN offload. * * @param dev * Pointer to Ethernet device structure. * @param mask * VLAN offload mask. * * @return * 0 on success, negative error value otherwise. */
| 1869 | * 0 on success, negative error value otherwise. |
| 1870 | */ |
| 1871 | static int mrvl_vlan_offload_set(struct rte_eth_dev *dev, int mask) |
| 1872 | { |
| 1873 | uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads; |
| 1874 | int ret; |
| 1875 | |
| 1876 | if (mask & RTE_ETH_VLAN_STRIP_MASK) { |
| 1877 | MRVL_LOG(ERR, "VLAN stripping is not supported\n"); |
| 1878 | return -ENOTSUP; |
| 1879 | } |
| 1880 | |
| 1881 | if (mask & RTE_ETH_VLAN_FILTER_MASK) { |
| 1882 | if (rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER) |
| 1883 | ret = mrvl_populate_vlan_table(dev, 1); |
| 1884 | else |
| 1885 | ret = mrvl_populate_vlan_table(dev, 0); |
| 1886 | |
| 1887 | if (ret) |
| 1888 | return ret; |
| 1889 | } |
| 1890 | |
| 1891 | if (mask & RTE_ETH_VLAN_EXTEND_MASK) { |
| 1892 | MRVL_LOG(ERR, "Extend VLAN not supported\n"); |
| 1893 | return -ENOTSUP; |
| 1894 | } |
| 1895 | |
| 1896 | return 0; |
| 1897 | } |
| 1898 | |
| 1899 | /** |
| 1900 | * Release buffers to hardware bpool (buffer-pool) |
nothing calls this directly
no test coverage detected