Hello, Paul!
 
Thanks for the answer.
 
 
I set offloads as follows:
...
#define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM       RTE_BIT64(1)
#define RTE_ETH_TX_OFFLOAD_UDP_CKSUM        RTE_BIT64(2)
#define RTE_ETH_TX_OFFLOAD_TCP_CKSUM        RTE_BIT64(3)
...
static uint64_t s_offloads = {
		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | RTE_ETH_TX_OFFLOAD_UDP_CKSUM | RTE_ETH_TX_OFFLOAD_TCP_CKSUM};
 
		if ( l_dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE )
			l_port_conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
 
		l_port_conf.txmode.offloads |= s_offloads;
 
l_dev_info.tx_offload_capa = 0x000080bf
l_port_conf.txmode.offloads = 0x0000000e - it's before rte_eth_dev_configure( ( ... &l_port_conf ...)

 
 
The receiver - is  DPDK application. Do I'm need set offloads at receiver site to eliminate "ierrors" ?
 
 
 
 
 
08.12.2022, 10:54, "Pavel Vazharov" <freakpv@gmail.com>:
Few questions:
1. Does the sending NIC support IP and TCP/UDP checksum offloading? I mean, if these flags set?
    struct rte_eth_dev_info dev_info;                                          
    rte_eth_dev_info_get(cfg.nic_port_id_, &dev_info);
    constexpr auto rxcsum = DEV_RX_OFFLOAD_CHECKSUM;                            
    constexpr auto l3csum = DEV_TX_OFFLOAD_IPV4_CKSUM;                          
    constexpr auto l4csum = DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM;                 
    dev_rx_csum_          = ((dev_info.tx_offload_capa & rxcsum) == rxcsum);    
    dev_tx_csum_l3_       = ((dev_info.tx_offload_capa & l3csum) == l3csum);    
    dev_tx_csum_l4_       = ((dev_info.tx_offload_capa & l4csum) == l4csum);
 
2. Do you "tell" the sending NIC to do the checksum calculations before sending the packets? I mean, do you do something like this for outgoing packets?
    if (offl.ip_csum) {                                                        
        pkt->ol_flags |= PKT_TX_IP_CKSUM | PKT_TX_IPV4;                        
        pkt->l2_len = RTE_ETHER_HDR_LEN;                                        
        pkt->l3_len = ih_len;                                                  
    }                                                                          
    if (offl.tcp_csum) {                                                        
        pkt->ol_flags |= PKT_TX_TCP_CKSUM;                                      
        pkt->l2_len = RTE_ETHER_HDR_LEN;                                        
        pkt->l3_len = ih_len;                                                  
    }                                                                          
    if (offl.udp_csum) {                                                        
        pkt->ol_flags |= PKT_TX_UDP_CKSUM;                                      
        pkt->l2_len = RTE_ETHER_HDR_LEN;                                        
        pkt->l3_len = ih_len;                                                  
    }
 
3. Is the receiving side also a DPDK application? If it is, and if the NIC there supports checksum offloading you can check the flags of the received packets to see if the receiving NIC has detected checksum errors.
pkt->ol_flags & (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD)
 
Hope some of the above helps.
 
On Thu, Dec 8, 2022 at 9:36 AM Ruslan R. Laishev <zator@yandex.ru> wrote:
Hello !
 
I wrote too small apps to send and receive  ethernet/ip/udp frame/packet/dg, so on received side I  see next situation:
number of in errors is equally a number of received packets. The test packet I made manually,  set offloads  IP/UDP checkusm.
Is there what I'm need to check additionally ?
 
 
 
--- 
С уважением,
Ruslan R. Laishev
OpenVMS bigot, natural born system/network progger, C contractor.
+79013163222
+79910009922