> No need for ternary statement. > > Instead of the complex test in skb_is_nonsg, can we just assume that > alignment will be off if having frag_list and changing gso_size. > > The same will apply to bpf_skb_net_shrink too. increase gso_size may be no problem and we can use BPF_F_ADJ_ROOM_FIXED_GSO to avoid update gso_size when shrink. > > Not sure that it is okay to linearize inside a BPF helper function. > Hopefully bpf experts can chime in on that. Thanks Fred Li