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 4A51843C94; Tue, 12 Mar 2024 19:08:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D99CB42E24; Tue, 12 Mar 2024 19:07:50 +0100 (CET) Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by mails.dpdk.org (Postfix) with ESMTP id 8A0FB42E24 for ; Tue, 12 Mar 2024 19:07:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1710266869; x=1741802869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=gd0ASrsx8aZNQeOiCvWZiIFFiKM6zWGLmHurF5ObY84=; b=RF6k7hUCS2tooneXOG2N0EY5IkQKa5szvKR4FQdETO89wGkd+E7mrVh6 O0eefrHGPqAVJSVIynQhSw12efM4TipIuwOBt7yDsxzanUkyMrbxE2/ps htJeV9CMaSuHs+julYCeuKoZdLvggJOjjSkydSNboYWNlEI7DVImlfpMO w=; X-IronPort-AV: E=Sophos;i="6.07,119,1708387200"; d="scan'208";a="279565838" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2024 18:07:46 +0000 Received: from EX19MTAEUC001.ant.amazon.com [10.0.10.100:59696] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.13.227:2525] with esmtp (Farcaster) id 8c4054d5-557b-4f40-85cd-e831c1939e3d; Tue, 12 Mar 2024 18:07:45 +0000 (UTC) X-Farcaster-Flow-ID: 8c4054d5-557b-4f40-85cd-e831c1939e3d Received: from EX19D007EUA002.ant.amazon.com (10.252.50.68) by EX19MTAEUC001.ant.amazon.com (10.252.51.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 12 Mar 2024 18:07:42 +0000 Received: from EX19MTAUWA001.ant.amazon.com (10.250.64.204) by EX19D007EUA002.ant.amazon.com (10.252.50.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 12 Mar 2024 18:07:42 +0000 Received: from HFA15-CG15235BS.amazon.com (10.85.143.174) by mail-relay.amazon.com (10.250.64.204) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Tue, 12 Mar 2024 18:07:40 +0000 From: To: CC: , Shai Brandes Subject: [PATCH v4 08/31] net/ena/base: add a new csum offload bit Date: Tue, 12 Mar 2024 20:06:53 +0200 Message-ID: <20240312180716.8515-9-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240312180716.8515-1-shaibran@amazon.com> References: <20240312180716.8515-1-shaibran@amazon.com> MIME-Version: 1.0 Content-Type: text/plain 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 From: Shai Brandes Add a new driver supported feature bit for TX IPv6 checksum offload. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- .../net/ena/base/ena_defs/ena_admin_defs.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net/ena/base/ena_defs/ena_admin_defs.h b/drivers/net/ena/base/ena_defs/ena_admin_defs.h index 4172916551..670e794c98 100644 --- a/drivers/net/ena/base/ena_defs/ena_admin_defs.h +++ b/drivers/net/ena/base/ena_defs/ena_admin_defs.h @@ -985,7 +985,8 @@ struct ena_admin_host_info { * 4 : rss_configurable_function_key * 5 : reserved * 6 : rx_page_reuse - * 31:7 : reserved + * 7 : tx_ipv6_csum_offload + * 31:8 : reserved */ uint32_t driver_supported_features; }; @@ -1377,6 +1378,8 @@ struct ena_admin_phc_resp { #define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK BIT(4) #define ENA_ADMIN_HOST_INFO_RX_PAGE_REUSE_SHIFT 6 #define ENA_ADMIN_HOST_INFO_RX_PAGE_REUSE_MASK BIT(6) +#define ENA_ADMIN_HOST_INFO_TX_IPV6_CSUM_OFFLOAD_SHIFT 7 +#define ENA_ADMIN_HOST_INFO_TX_IPV6_CSUM_OFFLOAD_MASK BIT(7) /* feature_rss_ind_table */ #define ENA_ADMIN_FEATURE_RSS_IND_TABLE_ONE_ENTRY_UPDATE_MASK BIT(0) @@ -1851,6 +1854,20 @@ static inline void set_ena_admin_host_info_rx_page_reuse(struct ena_admin_host_i ENA_ADMIN_HOST_INFO_RX_PAGE_REUSE_MASK; } +static inline +uint32_t get_ena_admin_host_info_tx_ipv6_csum_offload(const struct ena_admin_host_info *p) +{ + return (p->driver_supported_features & ENA_ADMIN_HOST_INFO_TX_IPV6_CSUM_OFFLOAD_MASK) >> + ENA_ADMIN_HOST_INFO_TX_IPV6_CSUM_OFFLOAD_SHIFT; +} + +static inline void set_ena_admin_host_info_tx_ipv6_csum_offload(struct ena_admin_host_info *p, + uint32_t val) +{ + p->driver_supported_features |= (val << ENA_ADMIN_HOST_INFO_TX_IPV6_CSUM_OFFLOAD_SHIFT) & + ENA_ADMIN_HOST_INFO_TX_IPV6_CSUM_OFFLOAD_MASK; +} + static inline uint8_t get_ena_admin_feature_rss_ind_table_one_entry_update(const struct ena_admin_feature_rss_ind_table *p) { return p->flags & ENA_ADMIN_FEATURE_RSS_IND_TABLE_ONE_ENTRY_UPDATE_MASK; -- 2.17.1