On 10/12, tianmuyang wrote: > Hi all: > There has been some discussions about adding checksum hint in AF_XDP such as this thread[1]. Now, we also plan to add checksum hint. My questions are: > 1. In this msg[2], is it appropriate if xdp_csum_status only includes 4 enums/macros(CHECKSUM_NONE...CHECKSUM_PARTIAL in skbuff.h)? Thus it becomes more generic. Also, in this msg[3] we can simply pass skb->ip_summed to csum_status in veth_xdp_rx_csum(). > 2. What should be taken care of if I want to add a new hint? IOW, what is acceptable to add a new hint? There is no clear guidance on what's acceptable and what's not. Each hint it evaluated case by case. IIRC, last time rx csum discussion stalled due to disagreement about the level of details which should be exposed from the generic kfuncs. Feel free to revive the discussion with another patchset. Regarding (1): the consensus seems to be (IIRC) is to expose tree cases only: no-csum, csum-unnecessary, csum-complete+csum. Anything else gets too device specific and too convoluted to handle on the xdp prog side. > Thanks! > > [1] https://lore.kernel.org/bpf/CAADnVQJPgpo7J0qVTQJYYocZ=Jnw=O5GfN2=PyAQ55+WWG_DVg@xxxxxxxxxxxxxx/ > [2] https://lore.kernel.org/bpf/20230728173923.1318596-13-larysa.zaremba@xxxxxxxxx/ > [3] https://lore.kernel.org/bpf/20230728173923.1318596-18-larysa.zaremba@xxxxxxxxx/ >