From: Saeed Mahameed <saeedm@mellanox.com>
To: netdev@vger.kernel.org, Jes Sorensen <jsorensen@fb.com>
Cc: kernel-team@fb.com, Or Gerlitz <ogerlitz@mellanox.com>,
Tzahi Oved <tzahio@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH RFC net-next 1/4] net/mlx5e: Rearrange netdevice ops structures
Date: Thu, 8 Jun 2017 02:42:11 +0300 [thread overview]
Message-ID: <20170607234214.24723-2-saeedm@mellanox.com> (raw)
In-Reply-To: <20170607234214.24723-1-saeedm@mellanox.com>
Since we are going to allow compiling the driver without eswitch,
it means we will have to compile out mlx5e_netdev_ops_sriov and will
replace it with mlx5e_netdev_ops_basic.
Move missing vxlan ndos into mlx5e_netdev_ops_basic.
Rearrange some ndos in mlx5e_netdev_ops_sriov and put vf/eswitch related
ndos towards the end of the struct.
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index cdff04b2aea1..931347b797c4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3646,6 +3646,9 @@ static const struct net_device_ops mlx5e_netdev_ops_basic = {
.ndo_change_mtu = mlx5e_change_mtu,
.ndo_do_ioctl = mlx5e_ioctl,
.ndo_set_tx_maxrate = mlx5e_set_tx_maxrate,
+ .ndo_udp_tunnel_add = mlx5e_add_vxlan_port,
+ .ndo_udp_tunnel_del = mlx5e_del_vxlan_port,
+ .ndo_features_check = mlx5e_features_check,
#ifdef CONFIG_RFS_ACCEL
.ndo_rx_flow_steer = mlx5e_rx_flow_steer,
#endif
@@ -3670,13 +3673,19 @@ static const struct net_device_ops mlx5e_netdev_ops_sriov = {
.ndo_set_features = mlx5e_set_features,
.ndo_change_mtu = mlx5e_change_mtu,
.ndo_do_ioctl = mlx5e_ioctl,
+ .ndo_set_tx_maxrate = mlx5e_set_tx_maxrate,
.ndo_udp_tunnel_add = mlx5e_add_vxlan_port,
.ndo_udp_tunnel_del = mlx5e_del_vxlan_port,
- .ndo_set_tx_maxrate = mlx5e_set_tx_maxrate,
.ndo_features_check = mlx5e_features_check,
#ifdef CONFIG_RFS_ACCEL
.ndo_rx_flow_steer = mlx5e_rx_flow_steer,
#endif
+ .ndo_tx_timeout = mlx5e_tx_timeout,
+ .ndo_xdp = mlx5e_xdp,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = mlx5e_netpoll,
+#endif
+ /* SRIOV E-Switch NDOs */
.ndo_set_vf_mac = mlx5e_set_vf_mac,
.ndo_set_vf_vlan = mlx5e_set_vf_vlan,
.ndo_set_vf_spoofchk = mlx5e_set_vf_spoofchk,
@@ -3685,11 +3694,6 @@ static const struct net_device_ops mlx5e_netdev_ops_sriov = {
.ndo_get_vf_config = mlx5e_get_vf_config,
.ndo_set_vf_link_state = mlx5e_set_vf_link_state,
.ndo_get_vf_stats = mlx5e_get_vf_stats,
- .ndo_tx_timeout = mlx5e_tx_timeout,
- .ndo_xdp = mlx5e_xdp,
-#ifdef CONFIG_NET_POLL_CONTROLLER
- .ndo_poll_controller = mlx5e_netpoll,
-#endif
.ndo_has_offload_stats = mlx5e_has_offload_stats,
.ndo_get_offload_stats = mlx5e_get_offload_stats,
};
--
2.11.0
next prev parent reply other threads:[~2017-06-07 23:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 23:42 [PATCH RFC net-next 0/4] Mellanox, MLX5 E-Switch break down Saeed Mahameed
2017-06-07 23:42 ` Saeed Mahameed [this message]
2017-06-08 7:52 ` [PATCH RFC net-next 1/4] net/mlx5e: Rearrange netdevice ops structures Or Gerlitz
2017-06-07 23:42 ` [PATCH RFC net-next 2/4] net/mlx5e: NIC netdev init flow cleanup Saeed Mahameed
2017-06-08 8:30 ` Or Gerlitz
2017-06-07 23:42 ` [PATCH RFC net-next 3/4] net/mlx5: Separate between eswitch and MPFS l2 table logic Saeed Mahameed
2017-06-08 9:13 ` Or Gerlitz
2017-06-08 10:26 ` Saeed Mahameed
2017-06-08 11:12 ` Or Gerlitz
2017-06-08 9:26 ` Or Gerlitz
2017-06-12 17:52 ` Jes Sorensen
2017-06-13 17:49 ` Saeed Mahameed
2017-06-13 18:18 ` Jes Sorensen
2017-06-07 23:42 ` [PATCH RFC net-next 4/4] net/mlx5: Add CONFIG_MLX5_ESWITCH Kconfig Saeed Mahameed
2017-06-08 9:35 ` Or Gerlitz
2017-06-08 10:32 ` Saeed Mahameed
2017-06-12 18:20 ` Jes Sorensen
2017-06-13 17:58 ` Saeed Mahameed
2017-06-13 18:21 ` Jes Sorensen
2017-06-13 21:53 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170607234214.24723-2-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=jsorensen@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=tzahio@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox