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 98BF5A057B; Wed, 1 Apr 2020 16:23:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4452F1BFD9; Wed, 1 Apr 2020 16:21:55 +0200 (CEST) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 551091BEC6 for ; Wed, 1 Apr 2020 16:21:53 +0200 (CEST) Received: by mail-lf1-f65.google.com with SMTP id j17so20586576lfe.7 for ; Wed, 01 Apr 2020 07:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CKG0MQd4cMNVIj/se7rzP6dTkI60VC1aDRThmCsVKHM=; b=wNxVwnW9wH+eMQ2FHZ6UjV9ZklzYEQfjQk3KC9PNchjHwLK7awjElr4SRkNvbIlPyU 0VqTZ+aMkTxEt3WQTBfYEHQhRjFmwEVPRiNl6tDB1wh/h8ckRiGPCS4vjUHUhT6v3iJo JHlOGIRz9hY3hvZjDGyadPeM9EMEojw2PyXdNJA+qTXXXp843ZGfJbf6ZQflfzNFl9G2 OkInh7ZJzelv1cbo40ApOg4BA1R2UBR0H1yVBVP8nZNib27rVD3XZxOik4pc4RbwI+IL hucHLhuzEkf6KTELgjwcgNqIDabaNbZfNS3XOzhFZfqbV/BD75AAxO7Eg5rm9W92diJ5 Hmcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CKG0MQd4cMNVIj/se7rzP6dTkI60VC1aDRThmCsVKHM=; b=kM+sWb8TsLGl9YmPH8b9EW9lyoFFQStpAEdbUHNgLicHgMFfHCaqF/jgcaihPTXUsS LX9R5nae3nL+iBVe1wPGTTyxY4FibqAsFxeVQs96oS/Bbbx5st1tyvhHtCf+89m/fNCv xUlSOJdOMpMwtG0ZtTRFcR9L5gvDcHEaoqfhNWBqRzUK8zts02BI7mC0oEVoCAbSQfj7 IQanMGG38xh5YmQ7WHhcFzO9L0NMqY4VA0J/IAScI5NszjwIfawtgRuFmI3Pgp+e6MHD /fFUB2Yvp2+qpH8ZZshl/hVaqu4BmopD/vp5OOBbGZCN4VbNWs+2/7eiXCDphEEQP8wy s2WQ== X-Gm-Message-State: AGi0Pua67SEmBMX/YrFkwGomzTBVIBZ2Pa61U8Pnx6yj/yIeTzNbyGOz ug9HVJ/0pJoOi/r/UdY235mgvhH6s2I= X-Google-Smtp-Source: APiQypJnaVJ3EP7F+qy084XeUK9EnIYrJaDbnVzCqvAEQ6Ug7NmYnQWLCYv17sWkUcEil3gRL1rZWw== X-Received: by 2002:a19:be92:: with SMTP id o140mr14441237lff.217.1585750912755; Wed, 01 Apr 2020 07:21:52 -0700 (PDT) Received: from mkPC.semihalf.local (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id r21sm1435961ljp.29.2020.04.01.07.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:21:52 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: mw@semihalf.com, mba@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, Michal Krawczyk Date: Wed, 1 Apr 2020 16:21:09 +0200 Message-Id: <20200401142127.13715-12-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200401142127.13715-1-mk@semihalf.com> References: <20200401142127.13715-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 11/29] net/ena/base: use 48-bit memory addresses in ena_com 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" ENA device is using 48-bit memory for IO. because of that, the upper limit had to be updated. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- drivers/net/ena/base/ena_com.c | 2 +- drivers/net/ena/base/ena_defs/ena_common_defs.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 7c1d0aef20..b7749209b3 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -73,7 +73,7 @@ static int ena_com_mem_addr_set(struct ena_com_dev *ena_dev, } ena_addr->mem_addr_low = lower_32_bits(addr); - ena_addr->mem_addr_high = upper_32_bits(addr); + ena_addr->mem_addr_high = (u16)upper_32_bits(addr); return 0; } diff --git a/drivers/net/ena/base/ena_defs/ena_common_defs.h b/drivers/net/ena/base/ena_defs/ena_common_defs.h index 1818c29a87..349474d265 100644 --- a/drivers/net/ena/base/ena_defs/ena_common_defs.h +++ b/drivers/net/ena/base/ena_defs/ena_common_defs.h @@ -9,10 +9,14 @@ #define ENA_COMMON_SPEC_VERSION_MAJOR 2 #define ENA_COMMON_SPEC_VERSION_MINOR 0 +/* ENA operates with 48-bit memory addresses. ena_mem_addr_t */ struct ena_common_mem_addr { uint32_t mem_addr_low; - uint32_t mem_addr_high; + uint16_t mem_addr_high; + + /* MBZ */ + uint16_t reserved16; }; #endif /* _ENA_COMMON_H_ */ -- 2.20.1