From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6051A0542; Fri, 11 Nov 2022 09:54:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 650B3410F2; Fri, 11 Nov 2022 09:54:27 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 3908840150 for ; Fri, 11 Nov 2022 09:54:26 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id B5B147D; Fri, 11 Nov 2022 11:54:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru B5B147D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1668156865; bh=VqDyrpn1nl5INcCPtvoAEvu0cl6IY6OlbEr0E88KBDA=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=xvDrK7GI65AmhXr8TaCPnFZR708gVKIiaxz/fm6LOBFglfsIf7aIWCCIiEUWaB/zf 9EKhJGw3atul+4EGpBLQ7E3RBD0I4DXOoxnAWXgMjiefeIFMvJkNC7O0l8/1VN4geZ 7BY6dPr19G20AXWWCo2WVaxhpRXU+a8tPmoOqlDQ= Message-ID: Date: Fri, 11 Nov 2022 11:54:25 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 1/2] app/testpmd: prepare to support TCP in Tx only mode Content-Language: en-US From: Andrew Rybchenko To: Ferruh Yigit , Aman Singh , Yuying Zhang Cc: dev@dpdk.org, Georgiy Levashov , Ivan Ilchenko References: <20221017144133.1899052-1-andrew.rybchenko@oktetlabs.ru> <20221017144133.1899052-2-andrew.rybchenko@oktetlabs.ru> Organization: OKTET Labs In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 11/11/22 11:36, Andrew Rybchenko wrote: > On 10/19/22 19:39, Ferruh Yigit wrote: >> On 10/17/2022 3:41 PM, Andrew Rybchenko wrote: >>> @@ -449,7 +474,8 @@ tx_only_begin(portid_t pi) >>>           return -EINVAL; >>>       } >>> -    setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len); >>> +    setup_pkt_l4_ip_headers(IPPROTO_UDP, &pkt_ip_hdr, &pkt_l4_hdr, >>> +                pkt_data_len); >> >> 'pkt_data_len' is calculated as following, it is correct for this >> patch, but it will be wrong in next patch because UDP header size is >> used in calculation. >> Need to fix this code, either in this patch and make it protocol >> agnostic, or in next patch with protocol check. > > Again, the goal of the patch is to do cosmetic changes to > prepare to add new functionality in follow up patches. > The patch does not add TCP support. So, I don't understand > how it can be improved here. So, I'll fix the problem in the > next patch when I have TCP support and corresponding branching. > Thanks a lot for the catch. > I've changed my mind on the best place where to fix it. I agree that it would be more logical to fix it here since all infrastructure to support other L4 protocol is added here.