summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorSherry Sun <sherry.sun@nxp.com>2020-09-11 14:34:30 +0800
committerSherry Sun <sherry.sun@nxp.com>2020-10-30 09:38:48 +0800
commitb92d8ef3c2dfae884f76a6b7c79dc009a7fb756d (patch)
treec8b475c2b4306203fe53291d2619e53e3a2c957d /samples
parent36c9b7a8085cc507a15927a4e333bc7778f6c9b3 (diff)
MLK-24937-3 samples: mpssd: disable GSO and virtconsole for imx-mic
Disable virtconsole in mpssd, since imx-mic now doesn't support enbale virtconsole and virtnet at the same time. Disable GSO feature for virtnet, now we only support small-packets transport. Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/mic/mpssd/mpssd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/samples/mic/mpssd/mpssd.c b/samples/mic/mpssd/mpssd.c
index c03a05d498f0..d4e8c42b9651 100644
--- a/samples/mic/mpssd/mpssd.c
+++ b/samples/mic/mpssd/mpssd.c
@@ -56,7 +56,7 @@ static struct mic_info mic_list;
#define READ_ONCE(x) (*(volatile typeof(x) *)&(x))
-#define GSO_ENABLED 1
+#define GSO_ENABLED 0
#define MAX_GSO_SIZE (64 * 1024)
#define ETH_H_LEN 14
#define MAX_NET_PKT_SIZE (_ALIGN_UP(MAX_GSO_SIZE + ETH_H_LEN, 64))
@@ -66,6 +66,8 @@ static struct mic_info mic_list;
#define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */
#endif
+#define VIRTCONS_SUPPORT 0
+
static struct {
struct mic_device_desc dd;
struct mic_vqconfig vqconfig[2];
@@ -1665,13 +1667,17 @@ retry:
mic->pid = fork();
switch (mic->pid) {
case 0:
+#if VIRTCONS_SUPPORT
add_virtio_device(mic, &virtcons_dev_page.dd);
+#endif
add_virtio_device(mic, &virtnet_dev_page.dd);
+#if VIRTCONS_SUPPORT
err = pthread_create(&mic->mic_console.console_thread, NULL,
virtio_console, mic);
if (err)
mpsslog("%s virtcons pthread_create failed %s\n",
mic->name, strerror(err));
+#endif
err = pthread_create(&mic->mic_net.net_thread, NULL,
virtio_net, mic);
if (err)