From: Dexuan Cui <decui@microsoft.com>
To: davem@davemloft.net, kuba@kernel.org, gustavoars@kernel.org,
haiyangz@microsoft.com, netdev@vger.kernel.org
Cc: kys@microsoft.com, stephen@networkplumber.org,
wei.liu@kernel.org, linux-kernel@vger.kernel.org,
linux-hyperv@vger.kernel.org, shacharr@microsoft.com,
paulros@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com,
Dexuan Cui <decui@microsoft.com>
Subject: [PATCH net-next 2/4] net: mana: Report OS info to the PF driver
Date: Fri, 29 Oct 2021 17:54:06 -0700 [thread overview]
Message-ID: <20211030005408.13932-3-decui@microsoft.com> (raw)
In-Reply-To: <20211030005408.13932-1-decui@microsoft.com>
The PF driver might use the OS info for statistical purposes.
Signed-off-by: Dexuan Cui <decui@microsoft.com>
---
drivers/net/ethernet/microsoft/mana/gdma_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index cee75b561f59..8a9ee2885f8c 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -3,6 +3,8 @@
#include <linux/module.h>
#include <linux/pci.h>
+#include <linux/utsname.h>
+#include <linux/version.h>
#include "mana.h"
@@ -848,6 +850,15 @@ int mana_gd_verify_vf_version(struct pci_dev *pdev)
req.gd_drv_cap_flags3 = GDMA_DRV_CAP_FLAGS3;
req.gd_drv_cap_flags4 = GDMA_DRV_CAP_FLAGS4;
+ req.drv_ver = 0; /* Unused*/
+ req.os_type = 0x10; /* Linux */
+ req.os_ver_major = LINUX_VERSION_MAJOR;
+ req.os_ver_minor = LINUX_VERSION_PATCHLEVEL;
+ req.os_ver_build = LINUX_VERSION_SUBLEVEL;
+ strscpy(req.os_ver_str1, utsname()->sysname, sizeof(req.os_ver_str1));
+ strscpy(req.os_ver_str2, utsname()->release, sizeof(req.os_ver_str2));
+ strscpy(req.os_ver_str3, utsname()->version, sizeof(req.os_ver_str3));
+
err = mana_gd_send_request(gc, sizeof(req), &req, sizeof(resp), &resp);
if (err || resp.hdr.status) {
dev_err(gc->dev, "VfVerifyVersionOutput: %d, status=0x%x\n",
--
2.17.1
next prev parent reply other threads:[~2021-10-30 0:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-30 0:54 [PATCH net-next 0/4] net: mana: some misc patches Dexuan Cui
2021-10-30 0:54 ` [PATCH net-next 1/4] net: mana: Fix the netdev_err()'s vPort argument in mana_init_port() Dexuan Cui
2021-10-30 15:30 ` Haiyang Zhang
2021-10-30 20:07 ` Stephen Hemminger
2021-11-01 5:59 ` Dexuan Cui
2021-10-30 0:54 ` Dexuan Cui [this message]
2021-10-30 15:35 ` [PATCH net-next 2/4] net: mana: Report OS info to the PF driver Haiyang Zhang
2021-11-01 6:07 ` Dexuan Cui
2021-10-30 0:54 ` [PATCH net-next 3/4] net: mana: Improve the HWC error handling Dexuan Cui
2021-10-30 15:36 ` Haiyang Zhang
2021-10-30 0:54 ` [PATCH net-next 4/4] net: mana: Support hibernation and kexec Dexuan Cui
2021-10-30 15:54 ` Haiyang Zhang
2021-11-01 7:03 ` Dexuan Cui
2021-11-01 15:12 ` Haiyang Zhang
2021-11-01 16:41 ` Dexuan Cui
2021-11-01 13:30 ` [PATCH net-next 0/4] net: mana: some misc patches patchwork-bot+netdevbpf
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=20211030005408.13932-3-decui@microsoft.com \
--to=decui@microsoft.com \
--cc=davem@davemloft.net \
--cc=gustavoars@kernel.org \
--cc=haiyangz@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=paulros@microsoft.com \
--cc=shacharr@microsoft.com \
--cc=stephen@networkplumber.org \
--cc=vkuznets@redhat.com \
--cc=wei.liu@kernel.org \
/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).