From: Gautam Dawar <gdawar@amd.com>
To: Jason Wang <jasowang@redhat.com>, Gautam Dawar <gautam.dawar@amd.com>
Cc: linux-net-drivers@amd.com, Edward Cree <ecree.xilinx@gmail.com>,
Martin Habets <habetsm.xilinx@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
eperezma@redhat.com, harpreet.anand@amd.com, tanuj.kamde@amd.com,
koushik.dutta@amd.com
Subject: Re: [PATCH net-next v2 13/14] sfc: update vdpa device MAC address
Date: Mon, 13 Mar 2023 12:07:16 +0530 [thread overview]
Message-ID: <e563f5a5-2d1a-fbc9-be2d-986b050c6548@amd.com> (raw)
In-Reply-To: <CACGkMEuY4KoiZKswjMDNfoeUTqUagXye-_qe-iP2JJq0schObQ@mail.gmail.com>
On 3/10/23 10:35, Jason Wang wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Tue, Mar 7, 2023 at 7:38 PM Gautam Dawar <gautam.dawar@amd.com> wrote:
>> As the VF MAC address can now be updated using `devlink port function set`
> What happens if we run this while the vpda is being used by a VM?
IIUC, updating the MAC address using devlink interface requires
unbinding the device from driver and hence updating the MAC while vdpa
device is in-use won't be possible. It can only be done via control vq
VIRTIO_NET_CTRL_MAC_ADDR_SET command, when available.
>
>> interface, fetch the vdpa device MAC address from the underlying VF during
>> vdpa device creation.
>>
>> Signed-off-by: Gautam Dawar <gautam.dawar@amd.com>
>> ---
>> drivers/net/ethernet/sfc/ef100_vdpa.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/sfc/ef100_vdpa.c b/drivers/net/ethernet/sfc/ef100_vdpa.c
>> index 30ca4ab00175..32182a01f6a5 100644
>> --- a/drivers/net/ethernet/sfc/ef100_vdpa.c
>> +++ b/drivers/net/ethernet/sfc/ef100_vdpa.c
>> @@ -272,6 +272,18 @@ static int get_net_config(struct ef100_vdpa_nic *vdpa_nic)
>> vdpa_nic->net_config.max_virtqueue_pairs =
>> cpu_to_efx_vdpa16(vdpa_nic, vdpa_nic->max_queue_pairs);
>>
>> + rc = ef100_get_mac_address(efx, vdpa_nic->mac_address,
>> + efx->client_id, true);
>> + if (rc) {
>> + dev_err(&vdpa_nic->vdpa_dev.dev,
>> + "%s: Get MAC for vf:%u failed:%d\n", __func__,
>> + vdpa_nic->vf_index, rc);
>> + return rc;
>> + }
> Can this override what is provisioned by the userspace?
No, this was carefully avoided by overwriting the userspace provisioned
MAC in ef100_vdpa_create():
rc = get_net_config(vdpa_nic);
if (rc)
goto err_put_device;
if (mac) {
ether_addr_copy(vdpa_nic->mac_address, mac);
vdpa_nic->mac_configured = true;
}
>
> Thanks
>
>
>> +
>> + if (is_valid_ether_addr(vdpa_nic->mac_address))
>> + vdpa_nic->mac_configured = true;
>> +
>> rc = efx_vdpa_get_mtu(efx, &mtu);
>> if (rc) {
>> dev_err(&vdpa_nic->vdpa_dev.dev,
>> --
>> 2.30.1
>>
next prev parent reply other threads:[~2023-03-13 6:37 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 11:36 [PATCH net-next v2 00/14] sfc: add vDPA support for EF100 devices Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 01/14] sfc: add function personality " Gautam Dawar
2023-03-10 5:04 ` Jason Wang
2023-03-13 11:50 ` Martin Habets
2023-03-15 5:11 ` Jason Wang
2023-03-16 9:06 ` Martin Habets
2023-03-17 3:52 ` Jason Wang
2023-03-21 12:17 ` Martin Habets
2023-03-07 11:36 ` [PATCH net-next v2 02/14] sfc: implement MCDI interface for vDPA operations Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 03/14] sfc: update MCDI headers for CLIENT_CMD_VF_PROXY capability bit Gautam Dawar
[not found] ` <9a8c3a7d-7815-3099-e75e-930568dccb35@amd.com>
2023-03-08 16:15 ` Martin Habets
2023-03-13 14:38 ` Gautam Dawar
2023-03-14 8:32 ` Martin Habets
2023-03-07 11:36 ` [PATCH net-next v2 04/14] sfc: evaluate vdpa support based on FW capability CLIENT_CMD_VF_PROXY Gautam Dawar
2023-03-10 5:04 ` Jason Wang
2023-03-13 12:39 ` Gautam Dawar
2023-03-14 8:38 ` Martin Habets
2023-03-17 11:18 ` Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 05/14] sfc: implement init and fini functions for vDPA personality Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 06/14] sfc: implement vDPA management device operations Gautam Dawar
2023-03-08 16:41 ` Martin Habets
2023-03-13 15:09 ` Gautam Dawar
[not found] ` <e773fcb5-985d-071f-25dd-1aaacd393922@amd.com>
2023-03-08 16:48 ` Martin Habets
2023-03-07 11:36 ` [PATCH net-next v2 07/14] sfc: implement vdpa device config operations Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 08/14] sfc: implement vdpa vring " Gautam Dawar
2023-03-08 17:06 ` Martin Habets
2023-03-13 17:03 ` Gautam Dawar
2023-03-10 5:04 ` Jason Wang
2023-03-13 12:33 ` Gautam Dawar
2023-03-15 5:08 ` Jason Wang
2023-03-15 17:06 ` Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 09/14] sfc: implement device status related vdpa " Gautam Dawar
2023-03-10 5:05 ` Jason Wang
2023-03-13 12:10 ` Gautam Dawar
2023-03-15 5:00 ` Jason Wang
2023-03-15 17:18 ` Gautam Dawar
2023-03-17 11:01 ` Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 10/14] sfc: implement filters for receiving traffic Gautam Dawar
2023-03-10 5:05 ` Jason Wang
2023-03-13 9:19 ` Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 11/14] sfc: use PF's IOMMU domain for running VF's MCDI commands Gautam Dawar
2023-03-08 18:01 ` Martin Habets
2023-03-13 17:19 ` Gautam Dawar
2023-03-14 8:48 ` Martin Habets
2023-03-10 5:05 ` Jason Wang
2023-03-13 7:35 ` Gautam Dawar
2023-03-07 11:36 ` [PATCH net-next v2 12/14] sfc: unmap VF's MCDI buffer when switching to vDPA mode Gautam Dawar
2023-03-10 5:05 ` Jason Wang
2023-03-13 7:09 ` Gautam Dawar
2023-03-15 4:54 ` Jason Wang
2023-03-07 11:36 ` [PATCH net-next v2 13/14] sfc: update vdpa device MAC address Gautam Dawar
2023-03-10 5:05 ` Jason Wang
2023-03-13 6:37 ` Gautam Dawar [this message]
2023-03-15 4:50 ` Jason Wang
2023-03-07 11:36 ` [PATCH net-next v2 14/14] sfc: register the vDPA device Gautam Dawar
2023-03-10 5:09 ` [PATCH net-next v2 00/14] sfc: add vDPA support for EF100 devices Jason Wang
2023-03-13 6:26 ` Gautam Dawar
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=e563f5a5-2d1a-fbc9-be2d-986b050c6548@amd.com \
--to=gdawar@amd.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=gautam.dawar@amd.com \
--cc=habetsm.xilinx@gmail.com \
--cc=harpreet.anand@amd.com \
--cc=jasowang@redhat.com \
--cc=koushik.dutta@amd.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=tanuj.kamde@amd.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
all inboxes | Powered by JetHome®