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 8F02CA0A0C; Tue, 3 Aug 2021 14:29:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 564DF411A7; Tue, 3 Aug 2021 14:29:13 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id 1ED2B40E3C; Tue, 3 Aug 2021 14:29:11 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id b13so14255342wrs.3; Tue, 03 Aug 2021 05:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xBbHERat51vSuuz2xMCPxphqw6hXN5RRYl3eB6qI8fE=; b=XoVoMMZIp41BNi/Y5uyKLuBoth4Vhel1jrVAcfZ+Jb5wM+0GIbMfrGQA22jpfPnnRx Uzh5p+FuqytQqB8ROQg/J9J04hmSKst3OBecLc8REo3xv3PYl4SUCtz59yPvjqYYaE2Z /Otq1KSxM6UWmDY/A7AjPo3T3WwpXUW1ocM6Dds7cm4k5BPXXpbSTBsUIghCtmQXqDmN 0CbAa9flTkUXfdEkESiKOqtRyi8dLGUkMsiCI0cytSahUHGu1WkhYgvcMA3yO4Pafifq o7cJyzBpDlQJuyOYn90/84Ycj2Pd3FHLmxLFwQuNGGnev5Ew8jHTQZAkdlsvgrxE+h4+ JqnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xBbHERat51vSuuz2xMCPxphqw6hXN5RRYl3eB6qI8fE=; b=KmJ4sKQlfymeQCvI3M4lfZrxYBMko5ajHAyKF1V6fuKXlr0X3vClNh+iTRTHkGq1nH ZwvGbGvT75PqW3+/sCGmEM9ctVzlO9kIo1Ku5KUdAcnNad/wTNXWq7wrztdtZV2fma/O SV6RxNtjnNb2MPJRSDNqTzSEnl1ktQgAJ0SabLIS6QzSdQU/tt+Jl1qTJirmGRY6AFuE XFYVfzJtrXNIxQv8W9fVIWgSLsMhjex9etjlxBEaCgeGPC98kqnx5s5Njejhv0wudnGS V6rjrKv46GOkHRBgQQyQyifNVtyEd9v1w93he6XigcDZlwWK1gjUYis8LpW2YrUOWqWh 1scg== X-Gm-Message-State: AOAM532CanViiH6F1+4mwIqGLr63qA8unNBwncXNrcCiTDiADQtEUb+b H2KKfBBdybR1SHy7x2UJl9KLuX0n+H5Z4l4Qde8= X-Google-Smtp-Source: ABdhPJzkvq0n1xLDbyobkW/lx8Dod+FAJbu1fmzGlqSTZV/STROfj6wlcg7iurzUkHIlhgEuWDs7lUkbLOFHUnSELyw= X-Received: by 2002:a05:6000:1812:: with SMTP id m18mr22424834wrh.239.1627993751008; Tue, 03 Aug 2021 05:29:11 -0700 (PDT) MIME-Version: 1.0 References: <20210630110404.21209-1-mohsin.kazmi14@gmail.com> <4459484.c67x3OAJy8@thomas> In-Reply-To: <4459484.c67x3OAJy8@thomas> From: Mohsin Kazmi Date: Tue, 3 Aug 2021 13:29:00 +0100 Message-ID: To: Thomas Monjalon Cc: Olivier Matz , dev@dpdk.org, ray.kinsella@intel.com, stable@dpdk.org, Tomasz Kulasek , Konstantin Ananyev , humin29@huawei.com, oulijun@huawei.com, yisen.zhuang@huawei.com, jiawenwu@trustnetic.com, jianwang@trustnetic.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v2] net: prepare the outer ipv4 hdr for checksum 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 Sender: "dev" Hi Thomas, Thanks for the review. I did the git grep rte_net_intel_cksum_prepare and git grep PKT_TX_OUTER_UDP_CKSUM. Following are the two drivers that use the function to prepare headers for checksum which also uses the outer_udp_checksum offload within drivers. 1) Hisilicon hns3 2) Wangxun txgbe 1) has implemented its own version of functions to prepare for outer header checksum. It may benefit/impact from the change. The function "rte_net_intel_cksum_prepare" is intel specific and intel cards do not support outer l4 checksum offload. DPDK may provide a generic version of the same function which can be used in different drivers. -br Mohsin On Thu, Jul 22, 2021 at 8:53 PM Thomas Monjalon wrote: > 07/07/2021 11:14, Mohsin Kazmi: > > On Wed, Jun 30, 2021 at 3:09 PM Olivier Matz > wrote: > > > > + if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) { > > > > inner_l3_offset += m->outer_l2_len + m->outer_l3_len; > > > > + /* > > > > + * prepare outer ipv4 header checksum by setting it to > 0, > > > > + * in order to be computed by hardware NICs. > > > > + */ > > > > + if (ol_flags & PKT_TX_OUTER_IP_CKSUM) { > > > > + ipv4_hdr = rte_pktmbuf_mtod_offset(m, > > > > + struct rte_ipv4_hdr *, > > > m->outer_l2_len); > > > > + ipv4_hdr->hdr_checksum = 0; > > > > + } > > > > + } > > > > > > What about outer L4 checksum? Does it requires the same than inner? > > > > > I am using XL710 for my testing with i40e dpdk driver. AFAIK, It doesn't > > support outer l4 checksum. I am not sure if other Intel NICs support it. > > This function is used by a lot of drivers. > Try git grep rte_net_intel_cksum_prepare > > I think we need more reviews on the v3. > Given it is far from being a new bug, I suggest to wait the next release > in order to have more feedbacks. > > >