From patchwork Thu Jun 8 19:09:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Cox X-Patchwork-Id: 1792508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=EafYn5Xc; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QcYkR0CJpz20Wn for ; Fri, 9 Jun 2023 05:12:30 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1q7L3X-0001AC-RP; Thu, 08 Jun 2023 19:12:23 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1q7L3W-00019r-Ab for kernel-team@lists.ubuntu.com; Thu, 08 Jun 2023 19:12:22 +0000 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 0E3613F15D for ; Thu, 8 Jun 2023 19:12:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686251542; bh=KtZ1G0FSX/XJhsJRpJwHLo6nVUvoFjLinHhX/ubUdeg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EafYn5XcvpAu6XewmFGQmfSsO5bJQmX5h80mgN5UUcN0VcLx03M0kJCy7OcMtJUjX WZuI8WTnMMaDkT6xbk0F+9H/8bif5nXgY93j+di/wRqcZ2YdIeUEeBJ8x3z44YngJ9 Vztp9ex6wx4nD3dH4T/OQn2pYXX7s/UPBeqKnEdD+gFozmyh2oenpcXwsweGRaB6ZM SfXPSGZPwckBiOPzjF4ytDe6HZdKnXNvOOExJe8EuRsO5NwM/EnjJus+xfHIe9U4ms uQ5rkr1oC6KsGT+Id8NJLVa30u1tGtXZXNMKbU4aUBi5kprhTwscfCQ+FtSiGzXzrP Omh2W8NCisSGA== Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-62619240316so9874596d6.3 for ; Thu, 08 Jun 2023 12:12:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686251539; x=1688843539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KtZ1G0FSX/XJhsJRpJwHLo6nVUvoFjLinHhX/ubUdeg=; b=ihMcSY97hSbzMQtZ+l/hAWlGC9Wys/UPtarF9DmVLs+Ul3KD0c0fk5N0/sob/QCmas zTjGqgQz/u8lu3WR1tKJ0WlkTjPAlEmTYs1+SuHh94wKRwP9+PhpvwLQ/6ZcGWv9wY4M dvOrvb0B8YvHv1+YSy5mpcCm5ontghgebZFq3rJhYKSSCFmU7Ls2lhiK84wnISPn/3p8 ScKrTId2+JI8+mqjqonhuc7PRj8sRblcFK/AldhylxIpCFUIJ0WH1920BAGnO16mnAHs txVcblceyPkcmh5SKElD9dywKS494Ut92Dm8a+6wg1+HwXzIzrdLyCTkzmy+27OG66OK 7PQw== X-Gm-Message-State: AC+VfDweQj3wADQPO54YSisznQElMnF4HobrkAq3x1weEVOy91MpQEb0 xpiwpgY731OAfOePNr/gj/CRaSJNkUXscTCl7a4CHo2i72lWbPalQ0GizPYHK/gGW1SeT2kqY1p ApGN170vRVXFsooYw6LDw5JHybyCAsxDZN/vx0CIVFkcYlnG/mw== X-Received: by 2002:a05:6214:27cf:b0:625:88f5:7c3d with SMTP id ge15-20020a05621427cf00b0062588f57c3dmr2989024qvb.1.1686251539723; Thu, 08 Jun 2023 12:12:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7InhIG8mKZCS6d3gWuzJ8q8Bni4xFjHeassAbDthti81MiNDOjfsdv4jq/V7xtmQ5k12WiIQ== X-Received: by 2002:a05:6214:27cf:b0:625:88f5:7c3d with SMTP id ge15-20020a05621427cf00b0062588f57c3dmr2989009qvb.1.1686251539466; Thu, 08 Jun 2023 12:12:19 -0700 (PDT) Received: from cox.conference ([45.72.211.59]) by smtp.gmail.com with ESMTPSA id w10-20020a0ce10a000000b006261c80d76dsm605517qvk.71.2023.06.08.12.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:12:17 -0700 (PDT) From: Philip Cox To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: SAUCE: (no-up) igc: Add RX HW timestamp to support XDP zero copy Date: Thu, 8 Jun 2023 15:09:41 -0400 Message-Id: <20230608190941.29063-2-philip.cox@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230608190941.29063-1-philip.cox@canonical.com> References: <20230608190941.29063-1-philip.cox@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: mohd faizal abdul rahim BugLink: https://bugs.launchpad.net/bugs/2023325 Enable the Rx HW Timestamp using metadata to userspace. Signed-off-by: Song Yoong Siang Signed-off-by: Mohd Faizal Abdul rahim (patch from launchpad) Signed-off-by: Philip Cox --- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 5e3b653574e2..c34d7b81180e 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2746,6 +2746,7 @@ static int igc_clean_rx_irq_zc(struct igc_q_vector *q_vector, const int budget) struct igc_rx_buffer *bi; ktime_t timestamp = 0; unsigned int size; + ktime_t *rxhwts; int res; desc = IGC_RX_DESC(ring, ntc); @@ -2775,6 +2776,9 @@ static int igc_clean_rx_irq_zc(struct igc_q_vector *q_vector, const int budget) } bi->xdp->data_end = bi->xdp->data + size; + rxhwts = bi->xdp->data - sizeof(ktime_t); + *rxhwts = timestamp; + bi->xdp->data_meta = rxhwts; xsk_buff_dma_sync_for_cpu(bi->xdp, ring->xsk_pool); res = __igc_xdp_run_prog(adapter, prog, bi->xdp);