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 13610A054D; Tue, 7 Jun 2022 18:44:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4634D427F0; Tue, 7 Jun 2022 18:44:13 +0200 (CEST) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mails.dpdk.org (Postfix) with ESMTP id 42B884161A for ; Tue, 7 Jun 2022 18:44:11 +0200 (CEST) Received: by mail-ej1-f41.google.com with SMTP id o7so3078819eja.1 for ; Tue, 07 Jun 2022 09:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DSTM9ywHOpziY6J33IN+nQH65Muxl0QwI8bwYQybWMg=; b=SUeNv9NHNPgx0DtC/BweOLn8NMcisSY/altGCLP5JHhS/dFWm3oEZsxhhWEBeVkybc ryH9Z7zaVP32jkjCHs+bePB6YBQQLt7Cyt751vjexkdJynsCUtbuPlc+YnhWj9XH+q0O 8i00Gj8BiQiej5j6ibzlpIu8sbC0MxIOyEFks+qctnErSvP44g6itiSkBMxXgi5ccZw4 qlss/Pnb3f3NYEngtKKcC0ICu38XzW9dif/w5bUQe3jaEErTf1vs74aJD/gWE8nrjltD mUCRDC//hFEVlRpg9sgEndwIF+JlyZGXVTBSU4tDuTb9tp811+QFRfXEwG/mqOsTw75z uQ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DSTM9ywHOpziY6J33IN+nQH65Muxl0QwI8bwYQybWMg=; b=6E5Te6f9hyEgPCJENfqiAISFyva8H2H1chHRJcXSNh1SMpFSfrPMR05MhLqwnYgNDm Rac82+J6gFLyjyG+yA4DeF1idBv9EfQsQiA7fHZB2a+oZIkHbwjlM/KYKq67ALD2HlDr WV2H+YLgVJPzSiFvBtrB27lOCW3Z9S8HplvaM8gskrsqMRrrkIEl51WgH8dGS2pLtl3j 9C7r9d7+fmqT/bT5563l+L0Zr40jtReFWeSPsDTRGd6pEKl3UDkwtlKapsDrD5CmUKbM ecHYiZeIDsi2iySjQ9jSFAVaymor/EY9rfSzR+x0DPvpSWgScovAi6Jm5Gj6vLWOYGwk ejag== X-Gm-Message-State: AOAM530mhTSfh2ouigAHXmiWe9ucizE7zBE7um0T4/8TbB3kOObuxcDr Fk+m0/YgQAiIV+nlwYvOf7MEgg== X-Google-Smtp-Source: ABdhPJzsmK2A5pqdgRPmlgXPbZzztLBDtZNweSGEy2uBNf7wiKkYIY4njxcKdLUYhmO50NpT5FfqVQ== X-Received: by 2002:a17:907:9606:b0:70a:e140:6329 with SMTP id gb6-20020a170907960600b0070ae1406329mr25755246ejc.471.1654620250852; Tue, 07 Jun 2022 09:44:10 -0700 (PDT) Received: from DESKTOP-U5LNN3J.localdomain ([83.142.187.86]) by smtp.gmail.com with ESMTPSA id m3-20020aa7c483000000b0042de29d8fc0sm10625901edq.94.2022.06.07.09.44.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 09:44:10 -0700 (PDT) From: Michal Krawczyk To: ferruh.yigit@intel.com Cc: shaibran@amazon.com, upstream@semihalf.com, mw@semihalf.com, dev@dpdk.org, Dawid Gorecki , Michal Krawczyk , Amit Bernstein Subject: [PATCH 2/4] net/ena: skip MTU verification Date: Tue, 7 Jun 2022 18:43:39 +0200 Message-Id: <20220607164341.19088-3-mk@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220607164341.19088-1-mk@semihalf.com> References: <20220607164341.19088-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Dawid Gorecki Remove MTU verification from ena_mtu_set() and ena_start(). It is done by rte_ethdev already, so there is no reason to repeat it inside the ENA driver. Signed-off-by: Dawid Gorecki Reviewed-by: Michal Krawczyk Reviewed-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/ena_ethdev.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 68a4478410..efd6dea4c2 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -987,20 +987,6 @@ static int ena_queue_start_all(struct rte_eth_dev *dev, return rc; } -static int ena_check_valid_conf(struct ena_adapter *adapter) -{ - uint32_t mtu = adapter->edev_data->mtu; - - if (mtu > adapter->max_mtu || mtu < ENA_MIN_MTU) { - PMD_INIT_LOG(ERR, - "Unsupported MTU of %d. Max MTU: %d, min MTU: %d\n", - mtu, adapter->max_mtu, ENA_MIN_MTU); - return ENA_COM_UNSUPPORTED; - } - - return 0; -} - static int ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx, bool use_large_llq_hdr) @@ -1165,13 +1151,6 @@ static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) ena_dev = &adapter->ena_dev; ena_assert_msg(ena_dev != NULL, "Uninitialized device\n"); - if (mtu > adapter->max_mtu || mtu < ENA_MIN_MTU) { - PMD_DRV_LOG(ERR, - "Invalid MTU setting. New MTU: %d, max MTU: %d, min MTU: %d\n", - mtu, adapter->max_mtu, ENA_MIN_MTU); - return -EINVAL; - } - rc = ENA_PROXY(adapter, ena_com_set_dev_mtu, ena_dev, mtu); if (rc) PMD_DRV_LOG(ERR, "Could not set MTU: %d\n", mtu); @@ -1193,10 +1172,6 @@ static int ena_start(struct rte_eth_dev *dev) return -EPERM; } - rc = ena_check_valid_conf(adapter); - if (rc) - return rc; - rc = ena_setup_rx_intr(dev); if (rc) return rc; -- 2.25.1