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 1BB9EA0597; Wed, 8 Apr 2020 10:31:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 319281C135; Wed, 8 Apr 2020 10:29:48 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id DF0041C114 for ; Wed, 8 Apr 2020 10:29:41 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id q22so2927787ljg.0 for ; Wed, 08 Apr 2020 01:29:41 -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=HpVZ4kVNqArrk0IuA/iGAadWKhmeXmbdyh4fcj88J9A=; b=NHv+AJRPLWi47LAU97kFIp/fz27aPVTsb1wSCfXjtkFiyFhvEgOum/dxsC4loJdGTJ 2EOpRY6kXEzf5AC2EWPtLlW00f7m97W0r2Lwtc/adI/Y1xlZnyo/m7eCXK22Gubh8bYU 3CAc80eVomTBCGy+1TtSQcdEmNAmCP+tj4ltQL8n4Yc9mUzGGTeCzmbi6Z0RcGAdkoDq PKWvK6oyMpIJlAiCCaFiUds4MPtT7RpIqwUIOhO+swqK/iXmNwldZI9apnfJPie8rWlU X28hRJfrO++hCS+Dmz+/nIA1mL2icOb3OFYq7BP+kgavMSxmrJ4CaJul+x9SsJrqmyN0 s1KQ== 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=HpVZ4kVNqArrk0IuA/iGAadWKhmeXmbdyh4fcj88J9A=; b=ToXt4CxZPi8HzH8x3NJ5vJwJRdQ8l88aa8yP7uPc7gEtP5VuVuLt93ExrZ0NmPyGd3 QnoZyRt+IIGeA2z4LPaI1y46X1BPLs9ZqNXV/XAJNRM64k5+4CZ7ISLMUFtDxtH3sTJA kzZ+l4FrBhNB9eRJhYq9XPglp3XVxNKikwWdiQzCfO1grJsBMdZ4RGh3LNYK9NvCJ421 igVzTDcgHikRR5aAbD7kIFLcoAh/Pi0irhejSzXw9hoZYdycrOAb5qHwvKF1dTQeqUW9 1MixJBiX8p2rFycj6ui7k/6xTF+R6PsRMFkJvLDJewZf0ujjowhpyNwpdIzL8zqQxK5u Mveg== X-Gm-Message-State: AGi0PuYcA9/bBV6dfGFmrJt0Hry20mW1e++K/M3X8QpCEtkZpdMniOb0 zaR/AQSuryCSeeKswkW4G3ot0YV9iMg= X-Google-Smtp-Source: APiQypIOXjbyBGvmQ/6IbJIuuUxsi3aT1mnM+ug2kAV0bh5M0FP+L8lDzZZi6RutnVucNI3Z9mbYMw== X-Received: by 2002:a2e:3c0b:: with SMTP id j11mr4357011lja.9.1586334581291; Wed, 08 Apr 2020 01:29:41 -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 e8sm765685lja.3.2020.04.08.01.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 01:29:40 -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, ferruh.yigit@intel.com, arybchenko@solarflare.com, Michal Krawczyk Date: Wed, 8 Apr 2020 10:29:04 +0200 Message-Id: <20200408082921.31000-14-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200408082921.31000-1-mk@semihalf.com> References: <20200408082921.31000-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 13/30] 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. >From the driver perspective, it's just a cosmetic change to make definition of the strucutre 'ena_common_mem_addr' more descriptive and the address value was verified anyway for the valid range in the function 'ena_com_mem_addr_set()'. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- v3: * Explain impact of this change in the commit log * Update copyright date of the modified file drivers/net/ena/base/ena_com.c | 2 +- drivers/net/ena/base/ena_defs/ena_common_defs.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index f128d3c4f3..4968054a99 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..d1ee40de32 100644 --- a/drivers/net/ena/base/ena_defs/ena_common_defs.h +++ b/drivers/net/ena/base/ena_defs/ena_common_defs.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright (c) 2015-2019 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. * All rights reserved. */ @@ -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