All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: longli@linuxonhyperv.com,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Wei Hu <weh@microsoft.com>,
	dev@dpdk.org, stable@dpdk.org, Long Li <longli@microsoft.com>
Subject: Re: [PATCH] net/netvsc: use rte_eth_dev_set_mtu to set VF MTU
Date: Fri, 19 Jul 2024 14:20:59 -0700	[thread overview]
Message-ID: <20240719142059.5f3e6cf6@hermes.local> (raw)
In-Reply-To: <9c0c9e2e-3179-419e-9f0c-bd24984ee45f@amd.com>

On Fri, 19 Jul 2024 21:39:04 +0100
Ferruh Yigit <ferruh.yigit@amd.com> wrote:

> > --- a/drivers/net/netvsc/hn_vf.c
> > +++ b/drivers/net/netvsc/hn_vf.c
> > @@ -264,7 +264,7 @@ int hn_vf_add(struct rte_eth_dev *dev, struct hn_data *hv)
> >  			goto exit;
> >  		}
> >  
> > -		ret = hn_vf_mtu_set(dev, dev->data->mtu);
> > +		ret = rte_eth_dev_set_mtu(port, dev->data->mtu);
> >  
> 
> As 'rte_eth_dev_set_mtu()' calls 'hn_vf_mtu_set()' in the call chain,
> won't it cause same problem?

The port is the vf so it will call the set_mtu on the VF not the netvsc
device so it is not in the call chain.

> 
> Does it help to make unlocked version of 'hn_vf_mtu_set()':
> ```
> _hn_vf_mtu_set()
> 	// set mtu without lock
> 
> hn_vf_mtu_set()
> 	lock()
> 	_hn_vf_mtu_set()
> 	unlock()
> ```

That was original proposal, but using rte_eth_dev_set_mtu() on the VF
port has more error checking.

  reply	other threads:[~2024-07-19 21:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 19:35 [PATCH] net/netvsc: use rte_eth_dev_set_mtu to set VF MTU longli
2024-07-19  4:37 ` Wei Hu
2024-07-19 20:39 ` Ferruh Yigit
2024-07-19 21:20   ` Stephen Hemminger [this message]
2024-07-21 21:24     ` Ferruh Yigit
2024-07-21 21:24 ` Ferruh Yigit

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=20240719142059.5f3e6cf6@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=longli@linuxonhyperv.com \
    --cc=longli@microsoft.com \
    --cc=stable@dpdk.org \
    --cc=weh@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.