mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
![]() Instead of rather verbose comparison of current netdev->features bits vs the incoming ones from user, let us compress them by a helper features set that will be the result of netdev->features XOR features. This way, current, extensive branches: if (features & NETIF_F_BIT && !(netdev->features & NETIF_F_BIT)) set_feature(true); else if (!(features & NETIF_F_BIT) && netdev->features & NETIF_F_BIT) set_feature(false); can become: netdev_features_t changed = netdev->features ^ features; if (changed & NETIF_F_BIT) set_feature(!!(features & NETIF_F_BIT)); This is nothing new as currently several other drivers use this approach, which I find much more convenient. Acked-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> |
||
---|---|---|
.. | ||
ice.h | ||
ice_adminq_cmd.h | ||
ice_arfs.c | ||
ice_arfs.h | ||
ice_base.c | ||
ice_base.h | ||
ice_cgu_regs.h | ||
ice_common.c | ||
ice_common.h | ||
ice_controlq.c | ||
ice_controlq.h | ||
ice_dcb.c | ||
ice_dcb.h | ||
ice_dcb_lib.c | ||
ice_dcb_lib.h | ||
ice_dcb_nl.c | ||
ice_dcb_nl.h | ||
ice_devids.h | ||
ice_devlink.c | ||
ice_devlink.h | ||
ice_eswitch.c | ||
ice_eswitch.h | ||
ice_ethtool.c | ||
ice_ethtool_fdir.c | ||
ice_fdir.c | ||
ice_fdir.h | ||
ice_flex_pipe.c | ||
ice_flex_pipe.h | ||
ice_flex_type.h | ||
ice_flow.c | ||
ice_flow.h | ||
ice_fltr.c | ||
ice_fltr.h | ||
ice_fw_update.c | ||
ice_fw_update.h | ||
ice_gnss.c | ||
ice_gnss.h | ||
ice_hw_autogen.h | ||
ice_idc.c | ||
ice_idc_int.h | ||
ice_lag.c | ||
ice_lag.h | ||
ice_lan_tx_rx.h | ||
ice_lib.c | ||
ice_lib.h | ||
ice_main.c | ||
ice_nvm.c | ||
ice_nvm.h | ||
ice_osdep.h | ||
ice_pf_vsi_vlan_ops.c | ||
ice_pf_vsi_vlan_ops.h | ||
ice_protocol_type.h | ||
ice_ptp.c | ||
ice_ptp.h | ||
ice_ptp_consts.h | ||
ice_ptp_hw.c | ||
ice_ptp_hw.h | ||
ice_repr.c | ||
ice_repr.h | ||
ice_sbq_cmd.h | ||
ice_sched.c | ||
ice_sched.h | ||
ice_sriov.c | ||
ice_sriov.h | ||
ice_switch.c | ||
ice_switch.h | ||
ice_tc_lib.c | ||
ice_tc_lib.h | ||
ice_trace.h | ||
ice_txrx.c | ||
ice_txrx.h | ||
ice_txrx_lib.c | ||
ice_txrx_lib.h | ||
ice_type.h | ||
ice_vf_lib.c | ||
ice_vf_lib.h | ||
ice_vf_lib_private.h | ||
ice_vf_mbx.c | ||
ice_vf_mbx.h | ||
ice_vf_vsi_vlan_ops.c | ||
ice_vf_vsi_vlan_ops.h | ||
ice_virtchnl.c | ||
ice_virtchnl.h | ||
ice_virtchnl_allowlist.c | ||
ice_virtchnl_allowlist.h | ||
ice_virtchnl_fdir.c | ||
ice_virtchnl_fdir.h | ||
ice_vlan.h | ||
ice_vlan_mode.c | ||
ice_vlan_mode.h | ||
ice_vsi_vlan_lib.c | ||
ice_vsi_vlan_lib.h | ||
ice_vsi_vlan_ops.c | ||
ice_vsi_vlan_ops.h | ||
ice_xsk.c | ||
ice_xsk.h | ||
Makefile |