| @@ -497,7 +497,7 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) · 496 unmodified lines |
| 497 | | 497 | |
| 498 | fdb_add: | 498 | fdb_add: |
| 499 | /* SRIOV is enabled: Forward UC MAC to vport */ | 499 | /* SRIOV is enabled: Forward UC MAC to vport */ |
| 500 | if (esw->fdb_table.legacy.fdb && esw->mode == SRIOV_LEGACY) | 500 | if (esw->fdb_table.legacy.fdb && esw->mode == MLX5_ESWITCH_LEGACY) |
| 501 | vaddr->flow_rule = esw_fdb_set_vport_rule(esw, mac, vport); | 501 | vaddr->flow_rule = esw_fdb_set_vport_rule(esw, mac, vport); |
| 502 | | 502 | |
| 503 | esw_debug(esw->dev, "\tADDED UC MAC: vport[%d] %pM fr(%p)\n", | 503 | esw_debug(esw->dev, "\tADDED UC MAC: vport[%d] %pM fr(%p)\n", |
| @@ -1577,7 +1577,7 @@ static void esw_apply_vport_conf(struct mlx5_eswitch *esw, · 1073 unmodified lines |
| 1577 | flags); | 1577 | flags); |
| 1578 | | 1578 | |
| 1579 | /* Only legacy mode needs ACLs */ | 1579 | /* Only legacy mode needs ACLs */ |
| 1580 | if (esw->mode == SRIOV_LEGACY) { | 1580 | if (esw->mode == MLX5_ESWITCH_LEGACY) { |
| 1581 | esw_vport_ingress_config(esw, vport); | 1581 | esw_vport_ingress_config(esw, vport); |
| 1582 | esw_vport_egress_config(esw, vport); | 1582 | esw_vport_egress_config(esw, vport); |
| 1583 | } | 1583 | } |
| @@ -1629,7 +1629,7 @@ static void esw_enable_vport(struct mlx5_eswitch *esw, struct mlx5_vport *vport, · 45 unmodified lines |
| 1629 | esw_debug(esw->dev, "Enabling VPORT(%d)\n", vport_num); | 1629 | esw_debug(esw->dev, "Enabling VPORT(%d)\n", vport_num); |
| 1630 | | 1630 | |
| 1631 | /* Create steering drop counters for ingress and egress ACLs */ | 1631 | /* Create steering drop counters for ingress and egress ACLs */ |
| 1632 | if (vport_num && esw->mode == SRIOV_LEGACY) | 1632 | if (vport_num && esw->mode == MLX5_ESWITCH_LEGACY) |
| 1633 | esw_vport_create_drop_counters(vport); | 1633 | esw_vport_create_drop_counters(vport); |
| 1634 | | 1634 | |
| 1635 | /* Restore old vport configuration */ | 1635 | /* Restore old vport configuration */ |
| @@ -1683,7 +1683,7 @@ static void esw_disable_vport(struct mlx5_eswitch *esw, · 47 unmodified lines |
| 1683 | vport->enabled_events = 0; | 1683 | vport->enabled_events = 0; |
| 1684 | esw_vport_disable_qos(esw, vport); | 1684 | esw_vport_disable_qos(esw, vport); |
| 1685 | if (esw->manager_vport != vport_num && | 1685 | if (esw->manager_vport != vport_num && |
| 1686 | esw->mode == SRIOV_LEGACY) { | 1686 | esw->mode == MLX5_ESWITCH_LEGACY) { |
| 1687 | mlx5_modify_vport_admin_state(esw->dev, | 1687 | mlx5_modify_vport_admin_state(esw->dev, |
| 1688 | MLX5_VPORT_STATE_OP_MOD_ESW_VPORT, | 1688 | MLX5_VPORT_STATE_OP_MOD_ESW_VPORT, |
| 1689 | vport_num, 1, | 1689 | vport_num, 1, |
| @@ -1728,7 +1728,7 @@ int mlx5_esw_query_functions(struct mlx5_core_dev *dev, u32 *out, int outlen) · 38 unmodified lines |
| 1728 | /* Public E-Switch API */ | 1728 | /* Public E-Switch API */ |
| 1729 | #define ESW_ALLOWED(esw) ((esw) && MLX5_ESWITCH_MANAGER((esw)->dev)) | 1729 | #define ESW_ALLOWED(esw) ((esw) && MLX5_ESWITCH_MANAGER((esw)->dev)) |
| 1730 | | 1730 | |
| 1731 | int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode) | 1731 | int mlx5_eswitch_enable(struct mlx5_eswitch *esw, int nvfs, int mode) |
| 1732 | { | 1732 | { |
| 1733 | struct mlx5_vport *vport; | 1733 | struct mlx5_vport *vport; |
| 1734 | int total_nvports = 0; | 1734 | int total_nvports = 0; |
| @@ -1737,19 +1737,17 @@ int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode) · 2 unmodified lines |
| 1737 | | 1737 | |
| 1738 | if (!ESW_ALLOWED(esw) || | 1738 | if (!ESW_ALLOWED(esw) || |
| 1739 | !MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, ft_support)) { | 1739 | !MLX5_CAP_ESW_FLOWTABLE_FDB(esw->dev, ft_support)) { |
| 1740 | esw_warn(esw->dev, "E-Switch FDB is not supported, aborting ...\n"); | 1740 | esw_warn(esw->dev, "FDB is not supported, aborting ...\n"); |
| 1741 | return -EOPNOTSUPP; | 1741 | return -EOPNOTSUPP; |
| 1742 | } | 1742 | } |
| 1743 | | 1743 | |
| 1744 | if (!MLX5_CAP_ESW_INGRESS_ACL(esw->dev, ft_support)) | 1744 | if (!MLX5_CAP_ESW_INGRESS_ACL(esw->dev, ft_support)) |
| 1745 | esw_warn(esw->dev, "E-Switch ingress ACL is not supported by FW\n"); | 1745 | esw_warn(esw->dev, "ingress ACL is not supported by FW\n"); |
| 1746 | | 1746 | |
| 1747 | if (!MLX5_CAP_ESW_EGRESS_ACL(esw->dev, ft_support)) | 1747 | if (!MLX5_CAP_ESW_EGRESS_ACL(esw->dev, ft_support)) |
| 1748 | esw_warn(esw->dev, "E-Switch engress ACL is not supported by FW\n"); | 1748 | esw_warn(esw->dev, "engress ACL is not supported by FW\n"); |
| 1749 | | 1749 | |
| 1750 | esw_info(esw->dev, "E-Switch enable SRIOV: nvfs(%d) mode (%d)\n", nvfs, mode); | 1750 | if (mode == MLX5_ESWITCH_OFFLOADS) { |
| 1751 | | | |
| 1752 | if (mode == SRIOV_OFFLOADS) { | | |
| 1753 | if (mlx5_core_is_ecpf_esw_manager(esw->dev)) | 1751 | if (mlx5_core_is_ecpf_esw_manager(esw->dev)) |
| 1754 | total_nvports = esw->total_vports; | 1752 | total_nvports = esw->total_vports; |
| 1755 | else | 1753 | else |
| @@ -1760,7 +1758,7 @@ int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode) · 4 unmodified lines |
| 1760 | | 1758 | |
| 1761 | mlx5_lag_update(esw->dev); | 1759 | mlx5_lag_update(esw->dev); |
| 1762 | | 1760 | |
| 1763 | if (mode == SRIOV_LEGACY) { | 1761 | if (mode == MLX5_ESWITCH_LEGACY) { |
| 1764 | err = esw_create_legacy_table(esw); | 1762 | err = esw_create_legacy_table(esw); |
| 1765 | if (err) | 1763 | if (err) |
| 1766 | goto abort; | 1764 | goto abort; |
| @@ -1777,11 +1775,11 @@ int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode) · 10 unmodified lines |
| 1777 | if (err) | 1775 | if (err) |
| 1778 | esw_warn(esw->dev, "Failed to create eswitch TSAR"); | 1776 | esw_warn(esw->dev, "Failed to create eswitch TSAR"); |
| 1779 | | 1777 | |
| 1780 | /* Don't enable vport events when in SRIOV_OFFLOADS mode, since: | 1778 | /* Don't enable vport events when in MLX5_ESWITCH_OFFLOADS mode, since: |
| 1781 | * 1. L2 table (MPFS) is programmed by PF/VF representors netdevs set_rx_mode | 1779 | * 1. L2 table (MPFS) is programmed by PF/VF representors netdevs set_rx_mode |
| 1782 | * 2. FDB/Eswitch is programmed by user space tools | 1780 | * 2. FDB/Eswitch is programmed by user space tools |
| 1783 | */ | 1781 | */ |
| 1784 | enabled_events = (mode == SRIOV_LEGACY) ? SRIOV_VPORT_EVENTS : 0; | 1782 | enabled_events = (mode == MLX5_ESWITCH_LEGACY) ? SRIOV_VPORT_EVENTS : 0; |
| 1785 | | 1783 | |
| 1786 | /* Enable PF vport */ | 1784 | /* Enable PF vport */ |
| 1787 | vport = mlx5_eswitch_get_vport(esw, MLX5_VPORT_PF); | 1785 | vport = mlx5_eswitch_get_vport(esw, MLX5_VPORT_PF); |
| @@ -1797,19 +1795,21 @@ int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode) · 9 unmodified lines |
| 1797 | mlx5_esw_for_each_vf_vport(esw, i, vport, nvfs) | 1795 | mlx5_esw_for_each_vf_vport(esw, i, vport, nvfs) |
| 1798 | esw_enable_vport(esw, vport, enabled_events); | 1796 | esw_enable_vport(esw, vport, enabled_events); |
| 1799 | | 1797 | |
| 1800 | if (mode == SRIOV_LEGACY) { | 1798 | if (mode == MLX5_ESWITCH_LEGACY) { |
| 1801 | MLX5_NB_INIT(&esw->nb, eswitch_vport_event, NIC_VPORT_CHANGE); | 1799 | MLX5_NB_INIT(&esw->nb, eswitch_vport_event, NIC_VPORT_CHANGE); |
| 1802 | mlx5_eq_notifier_register(esw->dev, &esw->nb); | 1800 | mlx5_eq_notifier_register(esw->dev, &esw->nb); |
| 1803 | } | 1801 | } |
| 1804 | | 1802 | |
| 1805 | esw_info(esw->dev, "SRIOV enabled: active vports(%d)\n", | 1803 | esw_info(esw->dev, "Enable: mode(%s), nvfs(%d), active vports(%d)\n", |
| 1806 | esw->enabled_vports); | 1804 | mode == MLX5_ESWITCH_LEGACY ? "LEGACY" : "OFFLOADS", |
| | 1805 | nvfs, esw->enabled_vports); |
| | 1806 | |
| 1807 | return 0; | 1807 | return 0; |
| 1808 | | 1808 | |
| 1809 | abort: | 1809 | abort: |
| 1810 | esw->mode = SRIOV_NONE; | 1810 | esw->mode = MLX5_ESWITCH_NONE; |
| 1811 | | 1811 | |
| 1812 | if (mode == SRIOV_OFFLOADS) { | 1812 | if (mode == MLX5_ESWITCH_OFFLOADS) { |
| 1813 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB); | 1813 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB); |
| 1814 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH); | 1814 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH); |
| 1815 | } | 1815 | } |
| @@ -1817,22 +1817,23 @@ abort: · 1 unmodified line |
| 1817 | return err; | 1817 | return err; |
| 1818 | } | 1818 | } |
| 1819 | | 1819 | |
| 1820 | void mlx5_eswitch_disable_sriov(struct mlx5_eswitch *esw) | 1820 | void mlx5_eswitch_disable(struct mlx5_eswitch *esw) |
| 1821 | { | 1821 | { |
| 1822 | struct esw_mc_addr *mc_promisc; | 1822 | struct esw_mc_addr *mc_promisc; |
| 1823 | struct mlx5_vport *vport; | 1823 | struct mlx5_vport *vport; |
| 1824 | int old_mode; | 1824 | int old_mode; |
| 1825 | int i; | 1825 | int i; |
| 1826 | | 1826 | |
| 1827 | if (!ESW_ALLOWED(esw) || esw->mode == SRIOV_NONE) | 1827 | if (!ESW_ALLOWED(esw) || esw->mode == MLX5_ESWITCH_NONE) |
| 1828 | return; | 1828 | return; |
| 1829 | | 1829 | |
| 1830 | esw_info(esw->dev, "disable SRIOV: active vports(%d) mode(%d)\n", | 1830 | esw_info(esw->dev, "Disable: mode(%s), nvfs(%d), active vports(%d)\n", |
| 1831 | esw->enabled_vports, esw->mode); | 1831 | esw->mode == MLX5_ESWITCH_LEGACY ? "LEGACY" : "OFFLOADS", |
| | 1832 | esw->dev->priv.sriov.num_vfs, esw->enabled_vports); |
| 1832 | | 1833 | |
| 1833 | mc_promisc = &esw->mc_promisc; | 1834 | mc_promisc = &esw->mc_promisc; |
| 1834 | | 1835 | |
| 1835 | if (esw->mode == SRIOV_LEGACY) | 1836 | if (esw->mode == MLX5_ESWITCH_LEGACY) |
| 1836 | mlx5_eq_notifier_unregister(esw->dev, &esw->nb); | 1837 | mlx5_eq_notifier_unregister(esw->dev, &esw->nb); |
| 1837 | | 1838 | |
| 1838 | mlx5_esw_for_all_vports(esw, i, vport) | 1839 | mlx5_esw_for_all_vports(esw, i, vport) |
| @@ -1843,17 +1844,17 @@ void mlx5_eswitch_disable_sriov(struct mlx5_eswitch *esw) · 4 unmodified lines |
| 1843 | | 1844 | |
| 1844 | esw_destroy_tsar(esw); | 1845 | esw_destroy_tsar(esw); |
| 1845 | | 1846 | |
| 1846 | if (esw->mode == SRIOV_LEGACY) | 1847 | if (esw->mode == MLX5_ESWITCH_LEGACY) |
| 1847 | esw_destroy_legacy_table(esw); | 1848 | esw_destroy_legacy_table(esw); |
| 1848 | else if (esw->mode == SRIOV_OFFLOADS) | 1849 | else if (esw->mode == MLX5_ESWITCH_OFFLOADS) |
| 1849 | esw_offloads_cleanup(esw); | 1850 | esw_offloads_cleanup(esw); |
| 1850 | | 1851 | |
| 1851 | old_mode = esw->mode; | 1852 | old_mode = esw->mode; |
| 1852 | esw->mode = SRIOV_NONE; | 1853 | esw->mode = MLX5_ESWITCH_NONE; |
| 1853 | | 1854 | |
| 1854 | mlx5_lag_update(esw->dev); | 1855 | mlx5_lag_update(esw->dev); |
| 1855 | | 1856 | |
| 1856 | if (old_mode == SRIOV_OFFLOADS) { | 1857 | if (old_mode == MLX5_ESWITCH_OFFLOADS) { |
| 1857 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB); | 1858 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB); |
| 1858 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH); | 1859 | mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH); |
| 1859 | } | 1860 | } |
| @@ -1914,7 +1915,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev) · 54 unmodified lines |
| 1914 | } | 1915 | } |
| 1915 | | 1916 | |
| 1916 | esw->enabled_vports = 0; | 1917 | esw->enabled_vports = 0; |
| 1917 | esw->mode = SRIOV_NONE; | 1918 | esw->mode = MLX5_ESWITCH_NONE; |
| 1918 | esw->offloads.inline_mode = MLX5_INLINE_MODE_NONE; | 1919 | esw->offloads.inline_mode = MLX5_INLINE_MODE_NONE; |
| 1919 | if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, reformat) && | 1920 | if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, reformat) && |
| 1920 | MLX5_CAP_ESW_FLOWTABLE_FDB(dev, decap)) | 1921 | MLX5_CAP_ESW_FLOWTABLE_FDB(dev, decap)) |
| @@ -1984,7 +1985,7 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw, · 63 unmodified lines |
| 1984 | | 1985 | |
| 1985 | ether_addr_copy(evport->info.mac, mac); | 1986 | ether_addr_copy(evport->info.mac, mac); |
| 1986 | evport->info.node_guid = node_guid; | 1987 | evport->info.node_guid = node_guid; |
| 1987 | if (evport->enabled && esw->mode == SRIOV_LEGACY) | 1988 | if (evport->enabled && esw->mode == MLX5_ESWITCH_LEGACY) |
| 1988 | err = esw_vport_ingress_config(esw, evport); | 1989 | err = esw_vport_ingress_config(esw, evport); |
| 1989 | | 1990 | |
| 1990 | unlock: | 1991 | unlock: |
| @@ -2068,7 +2069,7 @@ int __mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw, · 77 unmodified lines |
| 2068 | | 2069 | |
| 2069 | evport->info.vlan = vlan; | 2070 | evport->info.vlan = vlan; |
| 2070 | evport->info.qos = qos; | 2071 | evport->info.qos = qos; |
| 2071 | if (evport->enabled && esw->mode == SRIOV_LEGACY) { | 2072 | if (evport->enabled && esw->mode == MLX5_ESWITCH_LEGACY) { |
| 2072 | err = esw_vport_ingress_config(esw, evport); | 2073 | err = esw_vport_ingress_config(esw, evport); |
| 2073 | if (err) | 2074 | if (err) |
| 2074 | goto unlock; | 2075 | goto unlock; |
| @@ -2110,7 +2111,7 @@ int mlx5_eswitch_set_vport_spoofchk(struct mlx5_eswitch *esw, · 35 unmodified lines |
| 2110 | mlx5_core_warn(esw->dev, | 2111 | mlx5_core_warn(esw->dev, |
| 2111 | "Spoofchk in set while MAC is invalid, vport(%d)\n", | 2112 | "Spoofchk in set while MAC is invalid, vport(%d)\n", |
| 2112 | evport->vport); | 2113 | evport->vport); |
| 2113 | if (evport->enabled && esw->mode == SRIOV_LEGACY) | 2114 | if (evport->enabled && esw->mode == MLX5_ESWITCH_LEGACY) |
| 2114 | err = esw_vport_ingress_config(esw, evport); | 2115 | err = esw_vport_ingress_config(esw, evport); |
| 2115 | if (err) | 2116 | if (err) |
| 2116 | evport->info.spoofchk = pschk; | 2117 | evport->info.spoofchk = pschk; |
| @@ -2206,7 +2207,7 @@ int mlx5_eswitch_set_vepa(struct mlx5_eswitch *esw, u8 setting) · 89 unmodified lines |
| 2206 | return -EPERM; | 2207 | return -EPERM; |
| 2207 | | 2208 | |
| 2208 | mutex_lock(&esw->state_lock); | 2209 | mutex_lock(&esw->state_lock); |
| 2209 | if (esw->mode != SRIOV_LEGACY) { | 2210 | if (esw->mode != MLX5_ESWITCH_LEGACY) { |
| 2210 | err = -EOPNOTSUPP; | 2211 | err = -EOPNOTSUPP; |
| 2211 | goto out; | 2212 | goto out; |
| 2212 | } | 2213 | } |
| @@ -2229,7 +2230,7 @@ int mlx5_eswitch_get_vepa(struct mlx5_eswitch *esw, u8 *setting) · 16 unmodified lines |
| 2229 | return -EPERM; | 2230 | return -EPERM; |
| 2230 | | 2231 | |
| 2231 | mutex_lock(&esw->state_lock); | 2232 | mutex_lock(&esw->state_lock); |
| 2232 | if (esw->mode != SRIOV_LEGACY) { | 2233 | if (esw->mode != MLX5_ESWITCH_LEGACY) { |
| 2233 | err = -EOPNOTSUPP; | 2234 | err = -EOPNOTSUPP; |
| 2234 | goto out; | 2235 | goto out; |
| 2235 | } | 2236 | } |
| @@ -2372,7 +2373,7 @@ static int mlx5_eswitch_query_vport_drop_stats(struct mlx5_core_dev *dev, · 136 unmodified lines |
| 2372 | u64 bytes = 0; | 2373 | u64 bytes = 0; |
| 2373 | int err = 0; | 2374 | int err = 0; |
| 2374 | | 2375 | |
| 2375 | if (!vport->enabled || esw->mode != SRIOV_LEGACY) | 2376 | if (!vport->enabled || esw->mode != MLX5_ESWITCH_LEGACY) |
| 2376 | return 0; | 2377 | return 0; |
| 2377 | | 2378 | |
| 2378 | if (vport->egress.drop_counter) | 2379 | if (vport->egress.drop_counter) |
| @@ -2482,7 +2483,7 @@ free_out: · 103 unmodified lines |
| 2482 | | 2483 | |
| 2483 | u8 mlx5_eswitch_mode(struct mlx5_eswitch *esw) | 2484 | u8 mlx5_eswitch_mode(struct mlx5_eswitch *esw) |
| 2484 | { | 2485 | { |
| 2485 | return ESW_ALLOWED(esw) ? esw->mode : SRIOV_NONE; | 2486 | return ESW_ALLOWED(esw) ? esw->mode : MLX5_ESWITCH_NONE; |
| 2486 | } | 2487 | } |
| 2487 | EXPORT_SYMBOL_GPL(mlx5_eswitch_mode); | 2488 | EXPORT_SYMBOL_GPL(mlx5_eswitch_mode); |
| 2488 | | 2489 | |
| @@ -2499,10 +2500,10 @@ EXPORT_SYMBOL(mlx5_eswitch_get_encap_mode); · 10 unmodified lines |
| 2499 | | 2500 | |
| 2500 | bool mlx5_esw_lag_prereq(struct mlx5_core_dev *dev0, struct mlx5_core_dev *dev1) | 2501 | bool mlx5_esw_lag_prereq(struct mlx5_core_dev *dev0, struct mlx5_core_dev *dev1) |
| 2501 | { | 2502 | { |
| 2502 | if ((dev0->priv.eswitch->mode == SRIOV_NONE && | 2503 | if ((dev0->priv.eswitch->mode == MLX5_ESWITCH_NONE && |
| 2503 | dev1->priv.eswitch->mode == SRIOV_NONE) || | 2504 | dev1->priv.eswitch->mode == MLX5_ESWITCH_NONE) || |
| 2504 | (dev0->priv.eswitch->mode == SRIOV_OFFLOADS && | 2505 | (dev0->priv.eswitch->mode == MLX5_ESWITCH_OFFLOADS && |
| 2505 | dev1->priv.eswitch->mode == SRIOV_OFFLOADS)) | 2506 | dev1->priv.eswitch->mode == MLX5_ESWITCH_OFFLOADS)) |
| 2506 | return true; | 2507 | return true; |
| 2507 | | 2508 | |
| 2508 | return false; | 2509 | return false; |
| @@ -2511,6 +2512,6 @@ bool mlx5_esw_lag_prereq(struct mlx5_core_dev *dev0, struct mlx5_core_dev *dev1) · 2 unmodified lines |
| 2511 | bool mlx5_esw_multipath_prereq(struct mlx5_core_dev *dev0, | 2512 | bool mlx5_esw_multipath_prereq(struct mlx5_core_dev *dev0, |
| 2512 | struct mlx5_core_dev *dev1) | 2513 | struct mlx5_core_dev *dev1) |
| 2513 | { | 2514 | { |
| 2514 | return (dev0->priv.eswitch->mode == SRIOV_OFFLOADS && | 2515 | return (dev0->priv.eswitch->mode == MLX5_ESWITCH_OFFLOADS && |
| 2515 | dev1->priv.eswitch->mode == SRIOV_OFFLOADS); | 2516 | dev1->priv.eswitch->mode == MLX5_ESWITCH_OFFLOADS); |
| 2516 | } | 2517 | } |