Re: [PATCHv2 net-next 5/5] selftests/net: add offload checking test for virtual interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 08, 2025 at 11:48:58PM +0200, Sabrina Dubroca wrote:
> > > > After we add the netdevsim to bond,
> > > > the bond also shows "esp-hw-offload off" as the flag is inherit
> > > > in dev->hw_enc_features, not dev->features.
> > > 
> > > Did you mean dev->hw_features?
> > 
> > No, the xfrm_features in patch 01 updates dev->hw_enc_features, not
> > dev->hw_features.
> 
> Ok. But hw_enc_features is not the reason ethtool shows
> "esp-hw-offload off". This line is:
> 
> 	bond_dev->hw_features |= BOND_XFRM_FEATURES;
> 
> (from bond_setup)

Ah, there it is. You remind me that I have a bonding xfrm feature patch
not posted yet.

> 
> > Do you think if we should update dev->hw_features in the
> > patch?
> 
> For dev->hw_features (and dev->features) maybe not, since that depends
> on the upper device's features and implementation. I'm not sure we can
> have a common function without changing the behavior on at least one
> type of device.
> 
> But maybe ndo_fix_features could use a common
> netdev_fix_features_from_lowers? bond/team/bridge have very similar
> implementations.

Thanks, will add this to my todo list.

> 
> > > > It looks the only way to check if bond dev->hw_enc_features has NETIF_F_HW_ESP
> > > > is try set xfrm offload. As
> > > 
> > > Was this test meant to check hw_enc_features?
> > > 
> > > To check hw_enc_features, I think the only way would be sending GSO
> > > packets, since it's only used in those situations.
> > 
> > Oh.. That would make the test complex. Can we ignore this test first?
> 
> Ok for me.
> 
> > BTW, I'm a bit lost in the callbacks.gso_segment. e.g.
> > 
> > esp4_gso_segment
> >  - xfrm4_outer_mode_gso_segment
> >    - xfrm4_transport_gso_segment
> >      - ops->callbacks.gso_segment
> > 
> > But who calls esp4_gso_segment? I can't find where the features is assigned.
> 
> inet_gso_segment via inet_offloads[] (ESP is a L4 proto like UDP etc).

Ah, I only saw ipip_gso_segment calls inet_gso_segment, didn't notice
ipv4_offload_init() also init the callback with inet_gso_segment.

Thanks
Hangbin




[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux