net: rename ndo_setup_tc to ndo_setup_offload
Subsystems (23)
PATCH v2 1/1 net: rename ndo_setup_tc to ndo_setup_offload
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames ndo_setup_tc to ndo_setup_offload as a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.
---
v2: Missing function definition update in drivers/net/ethernet/sfc/falcon/tx.c
apparently I forgot to turn on that driver when doing compile-testing, problem spotted by Martin Habets. Keeping Jakub and Jiri Acked-by tags, as this is the only change in the v1 patch.
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++--- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 6 +++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 +++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +++--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 6 +++--- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 6 +++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 ++++---- drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 9 +++++---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 6 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 +++--- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_port.c | 4 ++-- drivers/net/ethernet/netronome/nfp/nfp_port.h | 4 ++-- drivers/net/ethernet/sfc/efx.c | 2 +- drivers/net/ethernet/sfc/efx.h | 4 ++-- drivers/net/ethernet/sfc/falcon/efx.c | 2 +- drivers/net/ethernet/sfc/falcon/efx.h | 4 ++-- drivers/net/ethernet/sfc/falcon/tx.c | 4 ++-- drivers/net/ethernet/sfc/tx.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- drivers/net/ethernet/ti/netcp_core.c | 6 +++--- drivers/net/netdevsim/netdev.c | 5 +++-- include/linux/netdevice.h | 18 +++++++++--------- net/dsa/slave.c | 7 ++++--- net/sched/cls_api.c | 6 +++--- net/sched/sch_cbs.c | 8 ++++---- net/sched/sch_etf.c | 8 ++++---- net/sched/sch_mq.c | 8 ++++---- net/sched/sch_mqprio.c | 16 ++++++++-------- net/sched/sch_prio.c | 15 ++++++++------- net/sched/sch_red.c | 15 ++++++++------- 40 files changed, 131 insertions(+), 126 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +3 -3
@@ -2246,8 +2246,8 @@ static void xgbe_poll_controller(struct net_device *netdev) }#endif /* End CONFIG_NET_POLL_CONTROLLER */ -static int xgbe_setup_tc (struct net_device *netdev,enum tc_setup_type type, -void *type_data) +static int xgbe_setup_offload (struct net_device *netdev, +enum tc_setup_type type,void *type_data) {struct xgbe_prv_data *pdata =netdev_priv (netdev);struct tc_mqprio_qopt *mqprio = type_data;
@@ -2501,7 +2501,7 @@ static const struct net_device_ops xgbe_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = xgbe_poll_controller, #endif - .ndo_setup_tc = xgbe_setup_tc, + .ndo_setup_offload = xgbe_setup_offload, .ndo_fix_features = xgbe_fix_features, .ndo_set_features = xgbe_set_features, .ndo_udp_tunnel_add = xgbe_udp_tunnel_add,
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +3 -3
@@ -4228,7 +4228,7 @@ void bnx2x_get_c2s_mapping(struct bnx2x *bp, u8 *c2s_map, u8 *c2s_default)* @netdev: net device to configure * @tc: number of traffic classes to enable * -* callback connected to the ndo_setup_tc function pointer +* callback connected to the ndo_setup_offload function pointer */ int bnx2x_setup_tc (struct net_device *dev,u8 num_tc) {
@@ -4293,8 +4293,8 @@ int bnx2x_setup_tc(struct net_device *dev, u8 num_tc)return 0 ; } -int __bnx2x_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +int __bnx2x_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {struct tc_mqprio_qopt *mqprio = type_data;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +2 -2
@@ -486,8 +486,8 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);/* setup_tc callback */ int bnx2x_setup_tc (struct net_device *dev,u8 num_tc); -int __bnx2x_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data); +int __bnx2x_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data);int bnx2x_get_vf_config (struct net_device *dev,int vf,struct ifla_vf_info *ivi);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +1 -1
@@ -13116,7 +13116,7 @@ static const struct net_device_ops bnx2x_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = poll_bnx2x, #endif - .ndo_setup_tc = __bnx2x_setup_tc, + .ndo_setup_offload = __bnx2x_setup_offload, #ifdef CONFIG_BNX2X_SRIOV .ndo_set_vf_mac = bnx2x_set_vf_mac, .ndo_set_vf_vlan = bnx2x_set_vf_vlan,
drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -3
@@ -7993,8 +7993,8 @@ static int bnxt_setup_tc_block(struct net_device *dev, } } -static int bnxt_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int bnxt_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -8377,7 +8377,7 @@ static const struct net_device_ops bnxt_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = bnxt_poll_controller, #endif - .ndo_setup_tc = bnxt_setup_tc, + .ndo_setup_offload = bnxt_setup_offload, #ifdef CONFIG_RFS_ACCEL .ndo_rx_flow_steer = bnxt_rx_flow_steer,#endif
drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c +3 -3
@@ -183,8 +183,8 @@ static int bnxt_vf_rep_setup_tc_block(struct net_device *dev, } } -static int bnxt_vf_rep_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int bnxt_vf_rep_setup_offload (struct net_device *dev, +enum tc_setup_type type,void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -263,7 +263,7 @@ static const struct net_device_ops bnxt_vf_rep_netdev_ops = { .ndo_stop = bnxt_vf_rep_close, .ndo_start_xmit = bnxt_vf_rep_xmit, .ndo_get_stats64 = bnxt_vf_rep_get_stats64, - .ndo_setup_tc = bnxt_vf_rep_setup_tc, + .ndo_setup_offload = bnxt_vf_rep_setup_offload, .ndo_get_phys_port_name = bnxt_vf_rep_get_phys_port_name };
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +3 -3
@@ -3027,8 +3027,8 @@ static int cxgb_setup_tc_block(struct net_device *dev, } } -static int cxgb_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int cxgb_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -3236,7 +3236,7 @@ static const struct net_device_ops cxgb4_netdev_ops = { .ndo_fcoe_disable = cxgb_fcoe_disable,#endif /* CONFIG_CHELSIO_T4_FCOE */ .ndo_set_tx_maxrate = cxgb_set_tx_maxrate, - .ndo_setup_tc = cxgb_setup_tc, + .ndo_setup_offload = cxgb_setup_offload, .ndo_udp_tunnel_add = cxgb_add_udp_tunnel, .ndo_udp_tunnel_del = cxgb_del_udp_tunnel, .ndo_features_check = cxgb_features_check,
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +3 -3
@@ -346,8 +346,8 @@ static void dpaa_get_stats64(struct net_device *net_dev, } } -static int dpaa_setup_tc (struct net_device *net_dev,enum tc_setup_type type, -void *type_data) +static int dpaa_setup_offload (struct net_device *net_dev, +enum tc_setup_type type,void *type_data) {struct dpaa_priv *priv =netdev_priv (net_dev);struct tc_mqprio_qopt *mqprio = type_data;
@@ -2619,7 +2619,7 @@ static const struct net_device_ops dpaa_ops = { .ndo_validate_addr = eth_validate_addr, .ndo_set_rx_mode = dpaa_set_rx_mode, .ndo_do_ioctl = dpaa_ioctl, - .ndo_setup_tc = dpaa_setup_tc, + .ndo_setup_offload = dpaa_setup_offload, };static int dpaa_napi_add (struct net_device *net_dev)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +3 -3
@@ -1368,8 +1368,8 @@ static int hns3_setup_tc(struct net_device *netdev, void *type_data)return ret; } -static int hns3_nic_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int hns3_nic_setup_offload (struct net_device *dev, +enum tc_setup_type type,void *type_data) {if (type !=TC_SETUP_QDISC_MQPRIO )return -EOPNOTSUPP ;
@@ -1543,7 +1543,7 @@ static const struct net_device_ops hns3_nic_netdev_ops = { .ndo_change_mtu = hns3_nic_change_mtu, .ndo_set_features = hns3_nic_set_features, .ndo_get_stats64 = hns3_nic_get_stats64, - .ndo_setup_tc = hns3_nic_setup_tc, + .ndo_setup_offload = hns3_nic_setup_offload, .ndo_set_rx_mode = hns3_nic_set_rx_mode, .ndo_vlan_rx_add_vid = hns3_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = hns3_vlan_rx_kill_vid,
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +3 -3
@@ -1428,8 +1428,8 @@ int fm10k_setup_tc(struct net_device *dev, u8 tc)return err; } -static int __fm10k_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int __fm10k_setup_offload (struct net_device *dev, +enum tc_setup_type type,void *type_data) {struct tc_mqprio_qopt *mqprio = type_data;
@@ -1639,7 +1639,7 @@ static const struct net_device_ops fm10k_netdev_ops = { .ndo_vlan_rx_kill_vid = fm10k_vlan_rx_kill_vid, .ndo_set_rx_mode = fm10k_set_rx_mode, .ndo_get_stats64 = fm10k_get_stats64, - .ndo_setup_tc = __fm10k_setup_tc, + .ndo_setup_offload = __fm10k_setup_offload, .ndo_set_vf_mac = fm10k_ndo_set_vf_mac, .ndo_set_vf_vlan = fm10k_ndo_set_vf_vlan, .ndo_set_vf_rate = fm10k_ndo_set_vf_bw,
drivers/net/ethernet/intel/i40e/i40e_main.c +3 -3
@@ -7563,8 +7563,8 @@ static int i40e_setup_tc_block(struct net_device *dev, } } -static int __i40e_setup_tc (struct net_device *netdev,enum tc_setup_type type, -void *type_data) +static int __i40e_setup_offload (struct net_device *netdev, +enum tc_setup_type type,void *type_data) {switch (type) {case TC_SETUP_QDISC_MQPRIO :
@@ -11864,7 +11864,7 @@ static const struct net_device_ops i40e_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = i40e_netpoll, #endif - .ndo_setup_tc = __i40e_setup_tc, + .ndo_setup_offload = __i40e_setup_offload, .ndo_set_features = i40e_set_features, .ndo_set_vf_mac = i40e_ndo_set_vf_mac, .ndo_set_vf_vlan = i40e_ndo_set_vf_port_vlan,
drivers/net/ethernet/intel/i40evf/i40evf_main.c +4 -4
@@ -2942,13 +2942,13 @@ static int i40evf_setup_tc_block(struct net_device *dev,* @type: type of offload * @type_date: tc offload data * -* This function is the callback to ndo_setup_tc in the +* This function is the callback to ndo_setup_offload in the * netdev_ops. * * Returns 0 on success **/ -static int i40evf_setup_tc (struct net_device *netdev,enum tc_setup_type type, -void *type_data) +static int i40evf_setup_offload (struct net_device *netdev, +enum tc_setup_type type,void *type_data) {switch (type) {case TC_SETUP_QDISC_MQPRIO :
@@ -3232,7 +3232,7 @@ static const struct net_device_ops i40evf_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = i40evf_netpoll, #endif - .ndo_setup_tc = i40evf_setup_tc, + .ndo_setup_offload = i40evf_setup_offload, };/**
drivers/net/ethernet/intel/igb/igb_main.c +3 -3
@@ -2845,8 +2845,8 @@ static int igb_offload_txtime(struct igb_adapter *adapter,return 0 ; } -static int igb_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int igb_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {struct igb_adapter *adapter =netdev_priv (dev);
@@ -2889,7 +2889,7 @@ static const struct net_device_ops igb_netdev_ops = { .ndo_set_features = igb_set_features, .ndo_fdb_add = igb_ndo_fdb_add, .ndo_features_check = igb_features_check, - .ndo_setup_tc = igb_setup_tc, + .ndo_setup_offload = igb_setup_offload, };/**
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +3 -3
@@ -9360,8 +9360,8 @@ static int ixgbe_setup_tc_mqprio(struct net_device *dev,return ixgbe_setup_tc (dev, mqprio->num_tc); } -static int __ixgbe_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int __ixgbe_setup_offload (struct net_device *dev, +enum tc_setup_type type,void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -10068,7 +10068,7 @@ static const struct net_device_ops ixgbe_netdev_ops = { .ndo_set_vf_trust = ixgbe_ndo_set_vf_trust, .ndo_get_vf_config = ixgbe_ndo_get_vf_config, .ndo_get_stats64 = ixgbe_get_stats64, - .ndo_setup_tc = __ixgbe_setup_tc, + .ndo_setup_offload = __ixgbe_setup_offload,#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = ixgbe_netpoll,#endif
drivers/net/ethernet/mellanox/mlx4/en_netdev.c +5 -4
@@ -130,8 +130,9 @@ int mlx4_en_alloc_tx_queue_per_tc(struct net_device *dev, u8 tc)return err; } -static int __mlx4_en_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int __mlx4_en_setup_offload (struct net_device *dev, +enum tc_setup_type type, +void *type_data) {struct tc_mqprio_qopt *mqprio = type_data;
@@ -2951,7 +2952,7 @@ static const struct net_device_ops mlx4_netdev_ops = {#endif .ndo_set_features = mlx4_en_set_features, .ndo_fix_features = mlx4_en_fix_features, - .ndo_setup_tc = __mlx4_en_setup_tc, + .ndo_setup_offload = __mlx4_en_setup_offload,#ifdef CONFIG_RFS_ACCEL .ndo_rx_flow_steer = mlx4_en_filter_rfs,#endif
@@ -2988,7 +2989,7 @@ static const struct net_device_ops mlx4_netdev_ops_master = {#endif .ndo_set_features = mlx4_en_set_features, .ndo_fix_features = mlx4_en_fix_features, - .ndo_setup_tc = __mlx4_en_setup_tc, + .ndo_setup_offload = __mlx4_en_setup_offload,#ifdef CONFIG_RFS_ACCEL .ndo_rx_flow_steer = mlx4_en_filter_rfs,#endif
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +3 -3
@@ -3383,8 +3383,8 @@ static int mlx5e_setup_tc_block(struct net_device *dev, }#endif -static int mlx5e_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int mlx5e_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {switch (type) {#ifdef CONFIG_MLX5_ESWITCH
@@ -4222,7 +4222,7 @@ static const struct net_device_ops mlx5e_netdev_ops = { .ndo_open = mlx5e_open, .ndo_stop = mlx5e_close, .ndo_start_xmit = mlx5e_xmit, - .ndo_setup_tc = mlx5e_setup_tc, + .ndo_setup_offload = mlx5e_setup_offload, .ndo_select_queue = mlx5e_select_queue, .ndo_get_stats64 = mlx5e_get_stats, .ndo_set_rx_mode = mlx5e_set_rx_mode,
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +3 -3
@@ -806,8 +806,8 @@ static int mlx5e_rep_setup_tc_block(struct net_device *dev, } } -static int mlx5e_rep_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int mlx5e_rep_setup_offload (struct net_device *dev, +enum tc_setup_type type,void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -917,7 +917,7 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = { .ndo_stop = mlx5e_rep_close, .ndo_start_xmit = mlx5e_xmit, .ndo_get_phys_port_name = mlx5e_rep_get_phys_port_name, - .ndo_setup_tc = mlx5e_rep_setup_tc, + .ndo_setup_offload = mlx5e_rep_setup_offload, .ndo_get_stats64 = mlx5e_rep_get_stats, .ndo_has_offload_stats = mlx5e_has_offload_stats, .ndo_get_offload_stats = mlx5e_get_offload_stats,
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +3 -3
@@ -1631,8 +1631,8 @@ static int mlxsw_sp_setup_tc_block(struct mlxsw_sp_port *mlxsw_sp_port, } } -static int mlxsw_sp_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int mlxsw_sp_setup_offload (struct net_device *dev, +enum tc_setup_type type,void *type_data) {struct mlxsw_sp_port *mlxsw_sp_port =netdev_priv (dev);
@@ -1708,7 +1708,7 @@ static const struct net_device_ops mlxsw_sp_port_netdev_ops = { .ndo_open = mlxsw_sp_port_open, .ndo_stop = mlxsw_sp_port_stop, .ndo_start_xmit = mlxsw_sp_port_xmit, - .ndo_setup_tc = mlxsw_sp_setup_tc, + .ndo_setup_offload = mlxsw_sp_setup_offload, .ndo_set_rx_mode = mlxsw_sp_set_rx_mode, .ndo_set_mac_address = mlxsw_sp_port_set_mac_address, .ndo_change_mtu = mlxsw_sp_port_change_mtu,
drivers/net/ethernet/netronome/nfp/nfp_net_common.c +1 -1
@@ -3494,7 +3494,7 @@ const struct net_device_ops nfp_net_netdev_ops = { .ndo_set_vf_spoofchk = nfp_app_set_vf_spoofchk, .ndo_get_vf_config = nfp_app_get_vf_config, .ndo_set_vf_link_state = nfp_app_set_vf_link_state, - .ndo_setup_tc = nfp_port_setup_tc, + .ndo_setup_offload = nfp_port_setup_offload, .ndo_tx_timeout = nfp_net_tx_timeout, .ndo_set_rx_mode = nfp_net_set_rx_mode, .ndo_change_mtu = nfp_net_change_mtu,
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +1 -1
@@ -270,7 +270,7 @@ const struct net_device_ops nfp_repr_netdev_ops = { .ndo_has_offload_stats = nfp_repr_has_offload_stats, .ndo_get_offload_stats = nfp_repr_get_offload_stats, .ndo_get_phys_port_name = nfp_port_get_phys_port_name, - .ndo_setup_tc = nfp_port_setup_tc, + .ndo_setup_offload = nfp_port_setup_offload, .ndo_set_vf_mac = nfp_app_set_vf_mac, .ndo_set_vf_vlan = nfp_app_set_vf_vlan, .ndo_set_vf_spoofchk = nfp_app_set_vf_spoofchk,
drivers/net/ethernet/netronome/nfp/nfp_port.c +2 -2
@@ -89,8 +89,8 @@ const struct switchdev_ops nfp_port_switchdev_ops = { .switchdev_port_attr_get = nfp_port_attr_get, }; -int nfp_port_setup_tc (struct net_device *netdev,enum tc_setup_type type, -void *type_data) +int nfp_port_setup_offload (struct net_device *netdev,enum tc_setup_type type, +void *type_data) {struct nfp_port *port;
drivers/net/ethernet/netronome/nfp/nfp_port.h +2 -2
@@ -124,8 +124,8 @@ extern const struct switchdev_ops nfp_port_switchdev_ops; __printf(2, 3) u8 *nfp_pr_et(u8 *data, const char *fmt, ...); -int nfp_port_setup_tc (struct net_device *netdev,enum tc_setup_type type, -void *type_data); +int nfp_port_setup_offload (struct net_device *netdev,enum tc_setup_type type, +void *type_data);static inline bool nfp_port_is_vnic (const struct nfp_port *port) {
drivers/net/ethernet/sfc/efx.c +1 -1
@@ -2518,7 +2518,7 @@ static const struct net_device_ops efx_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = efx_netpoll, #endif - .ndo_setup_tc = efx_setup_tc, + .ndo_setup_offload = efx_setup_offload, #ifdef CONFIG_RFS_ACCEL .ndo_rx_flow_steer = efx_filter_rfs,#endif
drivers/net/ethernet/sfc/efx.h +2 -2
@@ -27,8 +27,8 @@ netdev_tx_t efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev);netdev_tx_t efx_enqueue_skb (struct efx_tx_queue *tx_queue,struct sk_buff *skb);void efx_xmit_done (struct efx_tx_queue *tx_queue,unsigned int index); -int efx_setup_tc (struct net_device *net_dev,enum tc_setup_type type, -void *type_data); +int efx_setup_offload (struct net_device *net_dev,enum tc_setup_type type, +void *type_data);unsigned int efx_tx_max_skb_descs (struct efx_nic *efx);extern unsigned int efx_piobuf_size;extern bool efx_separate_tx_channels;
drivers/net/ethernet/sfc/falcon/efx.c +1 -1
@@ -2253,7 +2253,7 @@ static const struct net_device_ops ef4_netdev_ops = {#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = ef4_netpoll, #endif - .ndo_setup_tc = ef4_setup_tc, + .ndo_setup_offload = ef4_setup_offload, #ifdef CONFIG_RFS_ACCEL .ndo_rx_flow_steer = ef4_filter_rfs,#endif
drivers/net/ethernet/sfc/falcon/efx.h +2 -2
@@ -32,8 +32,8 @@ netdev_tx_t ef4_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev);netdev_tx_t ef4_enqueue_skb (struct ef4_tx_queue *tx_queue,struct sk_buff *skb);void ef4_xmit_done (struct ef4_tx_queue *tx_queue,unsigned int index); -int ef4_setup_tc (struct net_device *net_dev,enum tc_setup_type type, -void *type_data); +int ef4_setup_offload (struct net_device *net_dev,enum tc_setup_type type, +void *type_data);unsigned int ef4_tx_max_skb_descs (struct ef4_nic *efx);extern bool ef4_separate_tx_channels;
drivers/net/ethernet/sfc/falcon/tx.c +2 -2
@@ -425,8 +425,8 @@ void ef4_init_tx_queue_core_txq(struct ef4_tx_queue *tx_queue) efx->n_tx_channels : 0)); } -int ef4_setup_tc (struct net_device *net_dev,enum tc_setup_type type, -void *type_data) +int ef4_setup_offload (struct net_device *net_dev,enum tc_setup_type type, +void *type_data) {struct ef4_nic *efx =netdev_priv (net_dev);struct tc_mqprio_qopt *mqprio = type_data;
drivers/net/ethernet/sfc/tx.c +2 -2
@@ -687,8 +687,8 @@ void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue) efx->n_tx_channels : 0)); } -int efx_setup_tc (struct net_device *net_dev,enum tc_setup_type type, -void *type_data) +int efx_setup_offload (struct net_device *net_dev,enum tc_setup_type type, +void *type_data) {struct efx_nic *efx =netdev_priv (net_dev);struct tc_mqprio_qopt *mqprio = type_data;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 -3
@@ -3787,8 +3787,8 @@ static int stmmac_setup_tc_block(struct stmmac_priv *priv, } } -static int stmmac_setup_tc (struct net_device *ndev,enum tc_setup_type type, -void *type_data) +static int stmmac_setup_offload (struct net_device *ndev, +enum tc_setup_type type,void *type_data) {struct stmmac_priv *priv =netdev_priv (ndev);
@@ -4040,7 +4040,7 @@ static const struct net_device_ops stmmac_netdev_ops = { .ndo_set_rx_mode = stmmac_set_rx_mode, .ndo_tx_timeout = stmmac_tx_timeout, .ndo_do_ioctl = stmmac_ioctl, - .ndo_setup_tc = stmmac_setup_tc, + .ndo_setup_offload = stmmac_setup_offload,#ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = stmmac_poll_controller,#endif
drivers/net/ethernet/ti/netcp_core.c +3 -3
@@ -1889,8 +1889,8 @@ static int netcp_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vid)return err; } -static int netcp_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int netcp_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {struct tc_mqprio_qopt *mqprio = type_data;u8 num_tc;
@@ -1966,7 +1966,7 @@ static const struct net_device_ops netcp_netdev_ops = { .ndo_vlan_rx_kill_vid = netcp_rx_kill_vid, .ndo_tx_timeout = netcp_ndo_tx_timeout, .ndo_select_queue = dev_pick_tx_zero, - .ndo_setup_tc = netcp_setup_tc, + .ndo_setup_offload = netcp_setup_offload, }; static int netcp_create_interface(struct netcp_device *netcp_device,
drivers/net/netdevsim/netdev.c +3 -2
@@ -393,7 +393,8 @@ static int nsim_set_vf_link_state(struct net_device *dev, int vf, int state) }static int -nsim_setup_tc (struct net_device *dev,enum tc_setup_type type,void *type_data) +nsim_setup_offload (struct net_device *dev,enum tc_setup_type type, +void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -431,7 +432,7 @@ static const struct net_device_ops nsim_netdev_ops = { .ndo_get_vf_config = nsim_get_vf_config, .ndo_set_vf_link_state = nsim_set_vf_link_state, .ndo_set_vf_rss_query_en = nsim_set_vf_rss_query_en, - .ndo_setup_tc = nsim_setup_tc, + .ndo_setup_offload = nsim_setup_offload, .ndo_set_features = nsim_set_features, .ndo_bpf = nsim_bpf, };
include/linux/netdevice.h +9 -9
@@ -1047,12 +1047,12 @@ struct dev_ifalias {* with PF and querying it may introduce a theoretical security risk. * int (*ndo_set_vf_rss_query_en)(struct net_device *dev, int vf, bool setting); * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); -* int (*ndo_setup_tc)(struct net_device *dev, enum tc_setup_type type, -* void *type_data); -* Called to setup any 'tc' scheduler, classifier or action on @dev. -* This is always called from the stack with the rtnl lock held and netif -* tx queues stopped. This allows the netdevice to perform queue -* management safely. +* int (*ndo_setup_offload)(struct net_device *dev, enum tc_setup_type type, +void *type_data); +* Called to setup any offload, such as 'tc' scheduler, classifier or +* action on @dev. This is always called from the stack with the rtnl lock +* held and netif tx queues stopped. This allows the netdevice to perform +* queue management safely. * * Fiber Channel over Ethernet (FCoE) offload functions. * int (*ndo_fcoe_enable)(struct net_device *dev);
@@ -1297,9 +1297,9 @@ struct net_device_ops {int (*ndo_set_vf_rss_query_en)(struct net_device *dev,int vf,bool setting); -int (*ndo_setup_tc)(struct net_device *dev, -enum tc_setup_type type, -void *type_data); +int (*ndo_setup_offload)(struct net_device *dev, +enum tc_setup_type type, +void *type_data);#if IS_ENABLED (CONFIG_FCOE )int (*ndo_fcoe_enable)(struct net_device *dev);int (*ndo_fcoe_disable)(struct net_device *dev);
net/dsa/slave.c +4 -3
@@ -909,8 +909,9 @@ static int dsa_slave_setup_tc_block(struct net_device *dev, } } -static int dsa_slave_setup_tc (struct net_device *dev,enum tc_setup_type type, -void *type_data) +static int dsa_slave_setup_offload (struct net_device *dev, +enum tc_setup_type type, +void *type_data) {switch (type) {case TC_SETUP_BLOCK :
@@ -1045,7 +1046,7 @@ static const struct net_device_ops dsa_slave_netdev_ops = { .ndo_poll_controller = dsa_slave_poll_controller, #endif .ndo_get_phys_port_name = dsa_slave_get_phys_port_name, - .ndo_setup_tc = dsa_slave_setup_tc, + .ndo_setup_offload = dsa_slave_setup_offload, .ndo_get_stats64 = dsa_slave_get_stats64, };
net/sched/cls_api.c +3 -3
@@ -286,7 +286,7 @@ static int tcf_block_offload_cmd(struct tcf_block *block, bo.binder_type = ei->binder_type; bo.block = block; bo.extack = extack; -return dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_BLOCK , &bo); +return dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_BLOCK , &bo); } static int tcf_block_offload_bind(struct tcf_block *block, struct Qdisc *q,
@@ -296,7 +296,7 @@ static int tcf_block_offload_bind(struct tcf_block *block, struct Qdisc *q,struct net_device *dev = q->dev_queue->dev;int err; -if (!dev->netdev_ops->ndo_setup_tc) +if (!dev->netdev_ops->ndo_setup_offload) goto no_offload_dev_inc;/* If tc offload feature is disabled and the block we try to bind
@@ -325,7 +325,7 @@ static void tcf_block_offload_unbind(struct tcf_block *block, struct Qdisc *q,struct net_device *dev = q->dev_queue->dev;int err; -if (!dev->netdev_ops->ndo_setup_tc) +if (!dev->netdev_ops->ndo_setup_offload) goto no_offload_dev_dec; err =tcf_block_offload_cmd (block, dev, ei,TC_BLOCK_UNBIND ,NULL );if (err == -EOPNOTSUPP )
net/sched/sch_cbs.c +4 -4
@@ -206,13 +206,13 @@ static void cbs_disable_offload(struct net_device *dev, q->dequeue = cbs_dequeue_soft; ops = dev->netdev_ops; -if (!ops->ndo_setup_tc) +if (!ops->ndo_setup_offload)return ; cbs.queue = q->queue; cbs.enable =0 ; - err = ops->ndo_setup_tc (dev,TC_SETUP_QDISC_CBS , &cbs); + err = ops->ndo_setup_offload (dev,TC_SETUP_QDISC_CBS , &cbs);if (err <0 )pr_warn ("Couldn't disable CBS offload for queue %d\n" , cbs.queue);
@@ -226,7 +226,7 @@ static int cbs_enable_offload(struct net_device *dev, struct cbs_sched_data *q,struct tc_cbs_qopt_offload cbs = { };int err; -if (!ops->ndo_setup_tc) { +if (!ops->ndo_setup_offload) {NL_SET_ERR_MSG (extack,"Specified device does not support cbs offload" );return -EOPNOTSUPP ; }
@@ -239,7 +239,7 @@ static int cbs_enable_offload(struct net_device *dev, struct cbs_sched_data *q, cbs.idleslope = opt->idleslope; cbs.sendslope = opt->sendslope; - err = ops->ndo_setup_tc (dev,TC_SETUP_QDISC_CBS , &cbs); + err = ops->ndo_setup_offload (dev,TC_SETUP_QDISC_CBS , &cbs);if (err <0 ) {NL_SET_ERR_MSG (extack,"Specified device failed to setup cbs hardware offload" );return err;
net/sched/sch_etf.c +4 -4
@@ -272,13 +272,13 @@ static void etf_disable_offload(struct net_device *dev,return ; ops = dev->netdev_ops; -if (!ops->ndo_setup_tc) +if (!ops->ndo_setup_offload)return ; etf.queue = q->queue; etf.enable =0 ; - err = ops->ndo_setup_tc (dev,TC_SETUP_QDISC_ETF , &etf); + err = ops->ndo_setup_offload (dev,TC_SETUP_QDISC_ETF , &etf);if (err <0 )pr_warn ("Couldn't disable ETF offload for queue %d\n" , etf.queue);
@@ -294,7 +294,7 @@ static int etf_enable_offload(struct net_device *dev, struct etf_sched_data *q,if (q->offload)return 0 ; -if (!ops->ndo_setup_tc) { +if (!ops->ndo_setup_offload) {NL_SET_ERR_MSG (extack,"Specified device does not support ETF offload" );return -EOPNOTSUPP ; }
@@ -302,7 +302,7 @@ static int etf_enable_offload(struct net_device *dev, struct etf_sched_data *q, etf.queue = q->queue; etf.enable =1 ; - err = ops->ndo_setup_tc (dev,TC_SETUP_QDISC_ETF , &etf); + err = ops->ndo_setup_offload (dev,TC_SETUP_QDISC_ETF , &etf);if (err <0 ) {NL_SET_ERR_MSG (extack,"Specified device failed to setup ETF hardware offload" );return err;
net/sched/sch_mq.c +4 -4
@@ -32,10 +32,10 @@ static int mq_offload(struct Qdisc *sch, enum tc_mq_command cmd) .handle = sch->handle, }; -if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_tc) +if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_offload)return -EOPNOTSUPP ; -return dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_MQ , &opt); +return dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_MQ , &opt); }static void mq_offload_stats (struct Qdisc *sch)
@@ -50,8 +50,8 @@ static void mq_offload_stats(struct Qdisc *sch) }, }; -if (tc_can_offload (dev) && dev->netdev_ops->ndo_setup_tc) - dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_MQ , &opt); +if (tc_can_offload (dev) && dev->netdev_ops->ndo_setup_offload) + dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_MQ , &opt); }static void mq_destroy (struct Qdisc *sch)
net/sched/sch_mqprio.c +8 -8
@@ -44,15 +44,15 @@ static void mqprio_destroy(struct Qdisc *sch)kfree (priv->qdiscs); } -if (priv->hw_offload && dev->netdev_ops->ndo_setup_tc) { +if (priv->hw_offload && dev->netdev_ops->ndo_setup_offload) {struct tc_mqprio_qopt_offload mqprio = { {0 } };switch (priv->mode) {case TC_MQPRIO_MODE_DCB :case TC_MQPRIO_MODE_CHANNEL : - dev->netdev_ops->ndo_setup_tc (dev, -TC_SETUP_QDISC_MQPRIO , - &mqprio); + dev->netdev_ops->ndo_setup_offload (dev, +TC_SETUP_QDISC_MQPRIO , + &mqprio);break ;default :return ;
@@ -85,11 +85,11 @@ static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt)/* If hardware offload is requested we will leave it to the device * to either populate the queue counts itself or to validate the -* provided queue counts. If ndo_setup_tc is not present then +* provided queue counts. If ndo_setup_offload is not present then * hardware doesn't support offload and we should return an error. */ if (qopt->hw) -return dev->netdev_ops->ndo_setup_tc ?0 : -EINVAL ; +return dev->netdev_ops->ndo_setup_offload ?0 : -EINVAL ;for (i =0 ; i < qopt->num_tc; i++) {unsigned int last = qopt->offset[i] + qopt->count[i];
@@ -239,7 +239,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt, }/* If the mqprio options indicate that hardware should own -* the queue mapping then run ndo_setup_tc otherwise use the +* the queue mapping then run ndo_setup_offload otherwise use the * supplied and verified mapping */ if (qopt->hw) {
@@ -266,7 +266,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt,default :return -EINVAL ; } - err = dev->netdev_ops->ndo_setup_tc (dev, + err = dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_MQPRIO , &mqprio);if (err)
net/sched/sch_prio.c +8 -7
@@ -150,7 +150,7 @@ static int prio_offload(struct Qdisc *sch, struct tc_prio_qopt *qopt) .parent = sch->parent, }; -if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_tc) +if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_offload)return -EOPNOTSUPP ;if (qopt) {
@@ -163,7 +163,8 @@ static int prio_offload(struct Qdisc *sch, struct tc_prio_qopt *qopt) opt.command =TC_PRIO_DESTROY ; } -return dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_PRIO , &opt); +return dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_PRIO , + &opt); } static void
@@ -266,11 +267,11 @@ static int prio_dump_offload(struct Qdisc *sch)int err; sch->flags &= ~TCQ_F_OFFLOADED ; -if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_tc) +if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_offload)return 0 ; - err = dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_PRIO , - &hw_stats); + err = dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_PRIO , + &hw_stats);if (err == -EOPNOTSUPP )return 0 ;
@@ -328,8 +329,8 @@ static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, graft_offload.graft_params.child_handle = new->handle; graft_offload.command =TC_PRIO_GRAFT ; - err = dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_PRIO , - &graft_offload); + err = dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_PRIO , + &graft_offload);/* Don't report error if the graft is part of destroy operation. */ if (err && new != &noop_qdisc) {
net/sched/sch_red.c +8 -7
@@ -158,7 +158,7 @@ static int red_offload(struct Qdisc *sch, bool enable) .parent = sch->parent, }; -if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_tc) +if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_offload)return -EOPNOTSUPP ;if (enable) {
@@ -172,7 +172,8 @@ static int red_offload(struct Qdisc *sch, bool enable) opt.command =TC_RED_DESTROY ; } -return dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_RED , &opt); +return dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_RED , + &opt); }static void red_destroy (struct Qdisc *sch)
@@ -295,11 +296,11 @@ static int red_dump_offload_stats(struct Qdisc *sch, struct tc_red_qopt *opt) sch->flags &= ~TCQ_F_OFFLOADED ; -if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_tc) +if (!tc_can_offload (dev) || !dev->netdev_ops->ndo_setup_offload)return 0 ; - err = dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_RED , - &hw_stats); + err = dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_RED , + &hw_stats);if (err == -EOPNOTSUPP )return 0 ;
@@ -356,8 +357,8 @@ static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) .xstats = &q->stats, }, }; - dev->netdev_ops->ndo_setup_tc (dev,TC_SETUP_QDISC_RED , - &hw_stats_request); + dev->netdev_ops->ndo_setup_offload (dev,TC_SETUP_QDISC_RED , + &hw_stats_request); } st.early = q->stats.prob_drop + q->stats.forced_drop; st.pdrop = q->stats.pdrop;
Signature · 1 line
2.11.0
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>
Quoted 6 lines
---
v2: Missing function definition update indrivers/net/ethernet/sfc/falcon/tx.c
apparently I forgot to turn on that driver when doing compile-testing, problem spotted by Martin Habets. Keeping Jakub and Jiri Acked-by tags, as this is the only change in the v1 patch.
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>
One request I would have here is to not bother updating the individual driver function names. For now I would say we could leave the "_setup_tc" in the naming of the driver functions itself and just update the name of the net device operation. Renaming the driver functions just adds unnecessary overhead and complexity to the patch and will make it more difficult to maintain. When we get around to adding additional functionality that relates to the rename we could address renaming the function on a per driver basis in the future.
Quoted 13 lines · Alexander Duyck
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>
Quoted 8 lines
One request I would have here is to not bother updating the individual driver function names. For now I would say we could leave the "
_setup_tc" in the naming of the driver functions itself and just update the name of the net device operation. Renaming the driver functions just adds unnecessary overhead and complexity to the patch and will make it more difficult to maintain. When we get around to adding additional functionality that relates to the rename we could address renaming the function on a per driver basis in the future.
Plan was to follow up patch will rename enum tc_setup_type too:
https://marc.info/?l=linux-netdev&m=153193158512556&w=2
that will result in more renames in the driver side.
I would expect this will happen sooner or later, and out of tree patches will end up needing a rebase sooner or later, if that is the concern.
Quoted 25 lines · Pablo Neira Ayuso
Quoted 13 lines · Alexander Duyck
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>Quoted 8 lines
One request I would have here is to not bother updating the individual driver function names. For now I would say we could leave the "
_setup_tc" in the naming of the driver functions itself and just update the name of the net device operation. Renaming the driver functions just adds unnecessary overhead and complexity to the patch and will make it more difficult to maintain. When we get around to adding additional functionality that relates to the rename we could address renaming the function on a per driver basis in the future.Plan was to follow up patch will rename enum
tc_setup_typetoo:
Quoted 7 lines
https://marc.info/?l=linux-netdev&m=153193158512556&w=2
that will result in more renames in the driver side.
I would expect this will happen sooner or later, and out of tree patches will end up needing a rebase sooner or later, if that is the concern.
I was just thinking that renaming the functions themselves adds noise and makes it harder to debug functions later when they get renamed. As far as the out-of-tree driver I agree we will still have to deal with it due to the enum and NDO function rename. I just figured that using things like LXR is a bit easier when the function name stays the same and you have to move between versions.
- Alex
Quoted 34 lines · Alexander Duyck
Quoted 25 lines · Pablo Neira Ayuso
Quoted 13 lines · Alexander Duyck
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>Quoted 8 lines
One request I would have here is to not bother updating the individual driver function names. For now I would say we could leave the "
_setup_tc" in the naming of the driver functions itself and just update the name of the net device operation. Renaming the driver functions just adds unnecessary overhead and complexity to the patch and will make it more difficult to maintain. When we get around to adding additional functionality that relates to the rename we could address renaming the function on a per driver basis in the future.Plan was to follow up patch will rename enum
tc_setup_typetoo:Quoted 7 lines
https://marc.info/?l=linux-netdev&m=153193158512556&w=2
that will result in more renames in the driver side.
I would expect this will happen sooner or later, and out of tree patches will end up needing a rebase sooner or later, if that is the concern.
Quoted 6 lines
I was just thinking that renaming the functions themselves adds noise and makes it harder to debug functions later when they get renamed. As far as the out-of-tree driver I agree we will still have to deal with it due to the enum and NDO function rename. I just figured that using things like LXR is a bit easier when the function name stays the same and you have to move between versions.
Semantic changes in this interface are expected in follow up patches. Specifically, this interface will not be exclusively dedicated to 'tc' anymore. The function rename will provide a hint on this semantic change going on. I understand your concern, and I also tend to dislike renaming for the sake of renaming, but in this case this rename coveys useful information to developers.
Thanks.
Quoted 42 lines · Pablo Neira Ayuso
Quoted 34 lines · Alexander Duyck
Quoted 25 lines · Pablo Neira Ayuso
Quoted 13 lines · Alexander Duyck
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>Quoted 8 lines
One request I would have here is to not bother updating the individual driver function names. For now I would say we could leave the "
_setup_tc" in the naming of the driver functions itself and just update the name of the net device operation. Renaming the driver functions just adds unnecessary overhead and complexity to the patch and will make it more difficult to maintain. When we get around to adding additional functionality that relates to the rename we could address renaming the function on a per driver basis in the future.Plan was to follow up patch will rename enum
tc_setup_typetoo:Quoted 7 lines
https://marc.info/?l=linux-netdev&m=153193158512556&w=2
that will result in more renames in the driver side.
I would expect this will happen sooner or later, and out of tree patches will end up needing a rebase sooner or later, if that is the concern.
Quoted 6 lines
I was just thinking that renaming the functions themselves adds noise and makes it harder to debug functions later when they get renamed. As far as the out-of-tree driver I agree we will still have to deal with it due to the enum and NDO function rename. I just figured that using things like LXR is a bit easier when the function name stays the same and you have to move between versions.
Quoted 8 lines
Semantic changes in this interface are expected in follow up patches. Specifically, this interface will not be exclusively dedicated to 'tc' anymore. The function rename will provide a hint on this semantic change going on. I understand your concern, and I also tend to dislike renaming for the sake of renaming, but in this case this rename coveys useful information to developers.
Thanks.
I kind of figured semantic changes were coming. I just thought we could wait until then for the function renames. There isn't any point in renaming the function until it changes what it is actually doing. I suspect you may only have a few drivers that do the update as there probably isn't much value in updating the function name on drivers such as fm10k or igb as they are unlikely to ever support anything other than the tc offloads. That way it is clear that currently none of the drivers are supporting anything other than the tc offloads until the new functionality to support netfilter offloads is added on a per driver basis.
- Alex
Quoted 11 lines · Pablo Neira Ayuso
One of the recurring complaints is that we do not have, as a driver writer, a central location from which we would be fed offloading rules into a NIC. This was brought up again during Netconf'18 in Boston.
This patch just renames
ndo_setup_tctondo_setup_offloadas a very early initial work to prepare for follow up patch that discuss unified flow representation for the existing offload programming APIs.Signed-off-by Pablo Neira Ayuso <[email protected]>Acked-by Jiri Pirko <[email protected]>Acked-by Jakub Kicinski <[email protected]>
Thanks Pablo!
Signature · 1 line
Florian