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 D26DAA00C2; Mon, 31 Oct 2022 10:05:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82CD1427F0; Mon, 31 Oct 2022 10:04:28 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 3264D4069C for ; Mon, 31 Oct 2022 10:04:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667207059; x=1698743059; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FClQ5w/Mk2hiM5LjmdmDKQGn+U+zyfYc8YYh1s1BujM=; b=R9pMxO+5cVtZ1V/TYcqDhWkkqHhv1wTrbSFI+lGW7wUJP/L8Mpg6P2so uh/HC0z+9YJugvw1sp8lThMfnnedA//+3gCNg0jC29a2YBgaz2/00vGFC fp2R843ZX6YlqUCq/r0/5W1/yNRt0Mr2/84lMUYG9I8A6CiEdLWHSt0Ju H6vvAJOfss+9QwR9LPmSCjanGNWN2n54qBZ7CO8IqHSmur+xEcZvAimO9 R/jvVU6RqrP0UK8FIap4xDOt4lBKJGsUOr8UR9NfRxu665kzf80VQKVCx 7ZV7aJ/HN0pgSfwLdwAvLbB43/cL7Md2ca/0qDCiaNZGhef7ewKanqLlj Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10516"; a="370926324" X-IronPort-AV: E=Sophos;i="5.95,227,1661842800"; d="scan'208";a="370926324" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 02:04:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10516"; a="878664859" X-IronPort-AV: E=Sophos;i="5.95,227,1661842800"; d="scan'208";a="878664859" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by fmsmga006.fm.intel.com with ESMTP; 31 Oct 2022 02:04:13 -0700 From: beilei.xing@intel.com To: jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, Junfeng Guo Subject: [PATCH v18 09/18] net/idpf: add support for MTU configuration Date: Mon, 31 Oct 2022 08:33:37 +0000 Message-Id: <20221031083346.16558-10-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221031083346.16558-1-beilei.xing@intel.com> References: <20221031051556.98549-1-beilei.xing@intel.com> <20221031083346.16558-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