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>
This commit is contained in:
Sherry Sun 2020-09-11 14:34:30 +08:00
parent 36c9b7a808
commit b92d8ef3c2
1 changed files with 7 additions and 1 deletions

View File

@ -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)