From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2073DA04B6; Mon, 24 Aug 2020 22:12:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79B952B94; Mon, 24 Aug 2020 22:12:03 +0200 (CEST) Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by dpdk.org (Postfix) with ESMTP id B73DEF90 for ; Mon, 24 Aug 2020 22:12:01 +0200 (CEST) Received: by mail-oo1-f43.google.com with SMTP id x1so2196780oox.6 for ; Mon, 24 Aug 2020 13:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=h2XC5t7soo7JpTsn8g78mFZ/PfeUsLN8xWEr7TdVWPY=; b=LLRDrR12fR+0C5sRyX/4tZXkFNQah3MdReNa4nQPp1ekVtBgOcKA9eAQ4ZdFhzWUoe qGmgyeTGxHYpR9VsjB6WFZJp0SG7xueetdbMIGhAKbuHc7whnfhxoeuOZ+BcA5/303Ry s9qLbIayfKdqVdA9NS6spT9Pe8Bpt2XtWH200= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=h2XC5t7soo7JpTsn8g78mFZ/PfeUsLN8xWEr7TdVWPY=; b=p/CH2guWqZ2DW0sRGekypOd7UBqwyBQGvHS5hlJfN5ZxO9JAmIYXvbeSZXLn66e70Z 5Qk5U0Y+QLAEoQgkp/B8EZsLFz4IC8JQd0eOCHLEz7qy7bqPY/Geeu/gS1eAYMoQWmRk YpVRHsctc1JuTufJab7i8gTZe4YLp7cXiptWHv5HJvkMZBkTzxsAV9boxhR/hccUjnHL FgSRy3oGuAhUiIsGW7v3Jlhd7HnpD0quzFmlHlTS7szpuSfmqGY3HPSFurkywpk5wk9s IkT2Uownma1cXO8sCNPwHMENGdYPtZAU8fbJTVpCyUvrYFNZaAdsp7tfQAY5oOD2IcDE 26zQ== X-Gm-Message-State: AOAM532dO6adheKGmwSw/yQ6gEzEpJHERbyHWitt+1QLTmEVnVL0mi8i S1rFDQOrNYbdw1NdEx6uKYtNgGnoNUcjsCFJ3CsVjSwvTgc= X-Google-Smtp-Source: ABdhPJzuMa81nkVUPECzSfT5AfijwIQD51rYsNYwCdGE+sVAHO8/xWcuETyq4xJ86ZfIG+rxYV+naK2GkmHHD7tJo/o= X-Received: by 2002:a4a:d62c:: with SMTP id n12mr4844755oon.38.1598299916508; Mon, 24 Aug 2020 13:11:56 -0700 (PDT) MIME-Version: 1.0 From: Lance Richardson Date: Mon, 24 Aug 2020 16:11:45 -0400 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: [dpdk-dev] question regarding rx checksum offload flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" I was looking for some clarification regarding how rx checksum flags should be set for tunnel packets having both inner and outer IP/L4 headers. Based on comments in rte_mbuf_core.h, it seems to me. that the inner (encapsulated) IP header checksum status should determine which of these goes into ol_flags: PKT_RX_IP_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_BAD PKT_RX_IP_CKSUM_GOOD PKT_RX_IP_CKSUM_NONE Similarly, the L4 checksum status should determine which of these goes into ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_L4_CKSUM_BAD PKT_RX_L4_CKSUM_GOOD PKT_RX_L4_CKSUM_NONE The IP header checksum status for the outer IP header should determine whether this flag is set in ol_flags: PKT_RX_EIP_CKSUM_BAD And for UDP-based tunnel encapsulations, the outer L4 checksum status should determine which of these goes into ol_flags: PKT_RX_OUTER_L4_CKSUM_UNKNOWN PKT_RX_OUTER_L4_CKSUM_BAD PKT_RX_OUTER_L4_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_INVALID Finally, the checksum status of inner headers should have no influence on PKT_RX_EIP_CKSUM_BAD or PKT_RX_OUTER_L4_CKSUM_*, and likewise the checksum status of outer headers should have no influence on PKT_RX_L4_CKSUM_* or PKT_RX_IP_CKSUM_*. Is this correct? Apologies for such a basic question, but I'm having trouble correlating the above with implementations. Thanks and regards, Lance