Thanks for the patch Ray, Since header-split is on by default on this device, and vport_config is allocated zeroed, what about fliping the the user_flag meaning?
__IDPF_USER_FLAG_HSPLIT -> __IDPF_USER_FLAG_HSPLIT_DIS If we do that then config starts with the right value on the user_config, if it's flipped user_config is already persistent acrros hard resets. And then we can just delete the call idpf_vport_set_hsplit(vport, ETHTOOL_TCP_DATA_SPLIT_ENABLED) from idpf_vport_init and do not worry about where it should be. On Wed, Nov 11, 2026 at 8:11 PM Ray Zhang <[email protected]> wrote: > > idpf_vport_init() runs on both initial probe and hard reset, and > unconditionally calls idpf_vport_set_hsplit() with > ETHTOOL_TCP_DATA_SPLIT_ENABLED. If a user disabled header split via > 'ethtool -G <dev> tcp-data-split off', a subsequent hard reset sets > __IDPF_USER_FLAG_HSPLIT again and silently re-enables header split. > > Move the default idpf_vport_set_hsplit() call to idpf_cfg_netdev(), > which runs after idpf_vport_init() sets rxq_model and returns early on > hard reset when IDPF_VPORT_REG_NETDEV is already set. > > Found by code inspection. Reproduced and verified on an Intel IPU PF > (8086:1452) by disabling tcp-data-split via ethtool and triggering a > function reset from a test module via idpf_idc_request_reset(): before > this change tcp-data-split reverted to 'on' after reset, and with this > change it stays 'off' (with rx-hsplit remaining 0). > > Fixes: 9b1aa3ef2328 ("idpf: add get/set for Ethtool's header split ringparam") > Signed-off-by: Ray Zhang <[email protected]> > --- > drivers/net/ethernet/intel/idpf/idpf_lib.c | 1 + > drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 2 -- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c > b/drivers/net/ethernet/intel/idpf/idpf_lib.c > index cd1b173e3b27..db6603711be4 100644 > --- a/drivers/net/ethernet/intel/idpf/idpf_lib.c > +++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c > @@ -945,6 +945,7 @@ static int idpf_cfg_netdev(struct idpf_vport *vport) > netdev->vlan_features |= netdev->features | other_offloads; > netdev->hw_enc_features |= dflt_features | other_offloads; > idpf_xdp_set_features(vport); > + idpf_vport_set_hsplit(vport, ETHTOOL_TCP_DATA_SPLIT_ENABLED); > > idpf_set_ethtool_ops(netdev); > netif_set_affinity_auto(netdev); > diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c > b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c > index 928de868fa62..fc56437b01ab 100644 > --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c > +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c > @@ -3381,8 +3381,6 @@ int idpf_vport_init(struct idpf_vport *vport, struct > idpf_vport_max_q *max_q) > memcpy(vport->rx_itr_profile, rx_itr, IDPF_DIM_PROFILE_SLOTS); > memcpy(vport->tx_itr_profile, tx_itr, IDPF_DIM_PROFILE_SLOTS); > > - idpf_vport_set_hsplit(vport, ETHTOOL_TCP_DATA_SPLIT_ENABLED); > - > idpf_vport_init_num_qs(vport, vport_msg, rsrc); > idpf_vport_calc_num_q_desc(vport, rsrc); > idpf_vport_calc_num_q_groups(rsrc); > -- > 2.56.0.611.g1030f0b940-goog >
