From: Junfeng Guo <junfeng.guo@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, junfeng.guo@intel.com
Subject: [RFC v3 10/11] net/idpf: support MTU configuration
Date: Wed, 18 May 2022 16:25:30 +0800 [thread overview]
Message-ID: <20220518082531.1604266-11-junfeng.guo@intel.com> (raw)
In-Reply-To: <20220518082531.1604266-1-junfeng.guo@intel.com>
support ops mtu_set.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
drivers/net/idpf/idpf_ethdev.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index e46cadf83a..9b0bbca4a5 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -34,6 +34,7 @@ static int idpf_dev_stop(struct rte_eth_dev *dev);
static int idpf_dev_close(struct rte_eth_dev *dev);
static int idpf_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
+static int idpf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
int
idpf_dev_link_update(struct rte_eth_dev *dev,
@@ -72,6 +73,7 @@ static const struct eth_dev_ops idpf_eth_dev_ops = {
.tx_queue_release = idpf_dev_tx_queue_release,
.dev_infos_get = idpf_dev_info_get,
.link_update = idpf_dev_link_update,
+ .mtu_set = idpf_dev_mtu_set,
};
static int
@@ -142,6 +144,18 @@ idpf_dev_info_get(__rte_unused struct rte_eth_dev *dev, struct rte_eth_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)
{
--
2.25.1
next prev parent reply other threads:[~2022-05-18 8:27 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 7:07 [RFC 0/9] add support for idpf PMD in DPDK Junfeng Guo
2022-05-07 7:07 ` [RFC 1/9] net/idpf/base: introduce base code Junfeng Guo
2022-05-09 9:11 ` [RFC v2 0/9] add support for idpf PMD in DPDK Junfeng Guo
2022-05-09 9:11 ` [RFC v2 1/9] net/idpf/base: introduce base code Junfeng Guo
2022-05-09 9:11 ` [RFC v2 2/9] net/idpf/base: add OS specific implementation Junfeng Guo
2022-05-09 9:11 ` [RFC v2 3/9] net/idpf: support device initialization Junfeng Guo
2022-05-09 9:11 ` [RFC v2 4/9] net/idpf: support queue ops Junfeng Guo
2022-05-09 9:11 ` [RFC v2 5/9] net/idpf: support getting device information Junfeng Guo
2022-05-09 9:11 ` [RFC v2 6/9] net/idpf: support packet type getting Junfeng Guo
2022-05-09 9:11 ` [RFC v2 7/9] net/idpf: support link update Junfeng Guo
2022-05-09 9:11 ` [RFC v2 8/9] net/idpf: support basic Rx/Tx Junfeng Guo
2022-05-09 9:11 ` [RFC v2 9/9] net/idpf: support RSS Junfeng Guo
2022-05-18 8:25 ` [RFC v3 00/11] add support for idpf PMD in DPDK Junfeng Guo
2022-05-18 8:25 ` [RFC v3 01/11] net/idpf/base: introduce base code Junfeng Guo
2022-05-18 15:26 ` Stephen Hemminger
2022-05-18 8:25 ` [RFC v3 02/11] net/idpf/base: add OS specific implementation Junfeng Guo
2022-05-18 8:25 ` [RFC v3 03/11] net/idpf: support device initialization Junfeng Guo
2022-05-18 8:25 ` [RFC v3 04/11] net/idpf: support queue ops Junfeng Guo
2022-05-18 8:25 ` [RFC v3 05/11] net/idpf: support getting device information Junfeng Guo
2022-05-18 8:25 ` [RFC v3 06/11] net/idpf: support packet type getting Junfeng Guo
2022-05-18 8:25 ` [RFC v3 07/11] net/idpf: support link update Junfeng Guo
2022-05-18 8:25 ` [RFC v3 08/11] net/idpf: support basic Rx/Tx Junfeng Guo
2022-05-18 8:25 ` [RFC v3 09/11] net/idpf: support RSS Junfeng Guo
2022-05-18 8:25 ` Junfeng Guo [this message]
2022-05-18 8:25 ` [RFC v3 11/11] net/idpf: add CPF device ID for idpf map table Junfeng Guo
2022-05-07 7:07 ` [RFC 2/9] net/idpf/base: add OS specific implementation Junfeng Guo
2022-05-07 7:07 ` [RFC 3/9] net/idpf: support device initialization Junfeng Guo
2022-05-07 7:07 ` [RFC 4/9] net/idpf: support queue ops Junfeng Guo
2022-05-07 7:07 ` [RFC 5/9] net/idpf: support getting device information Junfeng Guo
2022-05-07 7:07 ` [RFC 6/9] net/idpf: support packet type getting Junfeng Guo
2022-05-07 7:07 ` [RFC 7/9] net/idpf: support link update Junfeng Guo
2022-05-07 7:07 ` [RFC 8/9] net/idpf: support basic Rx/Tx Junfeng Guo
2022-05-07 7:07 ` [RFC 9/9] net/idpf: support RSS Junfeng Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220518082531.1604266-11-junfeng.guo@intel.com \
--to=junfeng.guo@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).