Hello,

Please don't top post.

On Mon, Sep 18, 2023 at 11:47 AM Dexia Li <dexia...@jaguarmicro.com> wrote:
>
> Hi,david
>
> In dpdk 22.11 rte_mbuf_core.h file, there are notes as follows:
>
> /**
>  * TCP segmentation offload. To enable this offload feature for a
>  * packet to be transmitted on hardware supporting TSO:
>  *  - set the RTE_MBUF_F_TX_TCP_SEG flag in mbuf->ol_flags (this flag implies
>  *    RTE_MBUF_F_TX_TCP_CKSUM)
>  *  - set the flag RTE_MBUF_F_TX_IPV4 or RTE_MBUF_F_TX_IPV6
>  *  - if it's IPv4, set the RTE_MBUF_F_TX_IP_CKSUM flag
>  *  - fill the mbuf offload information: l2_len, l3_len, l4_len, tso_segsz
>  */
>
> And also, in testpmd example csum engine file csumonly.c, we can see
>  func process_inner_cksums partial code as follows
>
>                 if (tso_segsz)
>                         ol_flags |= RTE_MBUF_F_TX_TCP_SEG;
>                 else if (tx_offloads & RTE_ETH_TX_OFFLOAD_TCP_CKSUM) {
>                         ol_flags |= RTE_MBUF_F_TX_TCP_CKSUM;
>                 } else {
>                         if (info->is_tunnel)
>                                 l4_off = info->outer_l2_len + 
> info->outer_l3_len +
>                                          info->l2_len + info->l3_len;
>                         else
>                                 l4_off = info->l2_len + info->l3_len;
>                         tcp_hdr->cksum = 0;
>                         tcp_hdr->cksum =
>                                 get_udptcp_checksum(m, l3_hdr, l4_off,
>                                         info->ethertype);
>                 }
>
> We can see when RTE_MBUF_F_TX_TCP_SEG is set, and 
> RTE_ETH_TX_OFFLOAD_TCP_CKSUM is not set.

I don't see the point of copying this code.

Let me repeat what I said in my previous mail: asking for TSO means
implicitly that the hardware will do TCP checksum and the DPDK API
leaves some leeway to applications about this fact.
And specifically for the iavf driver, I see no bug in this area of the code.

To be frank, I found some bug in the net/ice and net/iavf drivers, but
it is not related to setting both ol_flags, and nothing is to be
changed on OVS side to fix this different issue I identified.

Please provide the details of which driver and what the issue is, in
your case, when both flags are set.


-- 
David Marchand

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to