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 6B058A00C4; Mon, 31 Oct 2022 05:08:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB4A14281C; Mon, 31 Oct 2022 05:07:32 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 2524F40A8B for ; Mon, 31 Oct 2022 05:07:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667189243; x=1698725243; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FClQ5w/Mk2hiM5LjmdmDKQGn+U+zyfYc8YYh1s1BujM=; b=AUQ0rfv69YfMkvaH7esdiprGQl05zb2UBc0S+kPThB/xi+/XWXDy5P3Z izdH7PABnHo6HLUStXjhDbjeBsMhhl0W8j7d1VFQC0ZiCF4/BFZggFznp O3lPvsbz0SFzgHhNgmkNxgkE+XHXpCCWgEyyjjfolZUxYDVGuHZX0MtFl F/9TEmHmJCxS2KKIbkqkxRs/dio59/XKNHhoIW6nDkRqQaHQJp/qXLQAH MA6cTqqUlSUsCDPebUHfRtegp1GERUvOgwo1zq9/LBTYhtFsxXQBYgFpS 7kO2gH9yKpZx0Ty7lYpLtxpQUrn+tuUUsM6ZMNn6rZBse1e7K05x40jQM g==; X-IronPort-AV: E=McAfee;i="6500,9779,10516"; a="310508290" X-IronPort-AV: E=Sophos;i="5.95,227,1661842800"; d="scan'208";a="310508290" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2022 21:07:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10516"; a="584527083" X-IronPort-AV: E=Sophos;i="5.95,227,1661842800"; d="scan'208";a="584527083" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by orsmga003.jf.intel.com with ESMTP; 30 Oct 2022 21:07:21 -0700 From: beilei.xing@intel.com To: andrew.rybchenko@oktetlabs.ru, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Junfeng Guo Subject: [PATCH v16 09/18] net/idpf: add support for MTU configuration Date: Mon, 31 Oct 2022 03:36:42 +0000 Message-Id: <20221031033651.98072-10-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221031033651.98072-1-beilei.xing@intel.com> References: <20221029032729.22772-1-beilei.xing@intel.com> <20221031033651.98072-1-beilei.xing@intel.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: Junfeng Guo Add dev ops mtu_set. Signed-off-by: Beilei Xing Signed-off-by: Junfeng Guo --- doc/guides/nics/features/idpf.ini | 1 + drivers/net/idpf/idpf_ethdev.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/doc/guides/nics/features/idpf.ini b/doc/guides/nics/features/idpf.ini index 46aab2eb61..d722c49fde 100644 --- a/doc/guides/nics/features/idpf.ini +++ b/doc/guides/nics/features/idpf.ini @@ -4,6 +4,7 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] +MTU update = Y Linux = Y x86-32 = Y x86-64 = Y diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c index 1485f40e71..856f3d7266 100644 --- a/drivers/net/idpf/idpf_ethdev.c +++ b/drivers/net/idpf/idpf_ethdev.c @@ -83,6 +83,18 @@ idpf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) return 0; } +static int +idpf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu __rte_unused) +{ + /* mtu setting is forbidden if port is start */ + if (dev->data->dev_started) { + PMD_DRV_LOG(ERR, "port must be stopped before configuration"); + return -EBUSY; + } + + return 0; +} + static int idpf_init_vport_req_info(struct rte_eth_dev *dev) { @@ -760,6 +772,7 @@ static const struct eth_dev_ops idpf_eth_dev_ops = { .tx_queue_stop = idpf_tx_queue_stop, .rx_queue_release = idpf_dev_rx_queue_release, .tx_queue_release = idpf_dev_tx_queue_release, + .mtu_set = idpf_dev_mtu_set, }; static uint16_t -- 2.26.2