From: lxu <lxu4net@qq.com>
To: dev <dev@dpdk.org>
Subject: [dpdk-dev] Can the empty struct rte_eth_txmode be enhanced?
Date: Wed, 12 Jun 2013 12:54:51 +0800 [thread overview]
Message-ID: <tencent_30A6C31C56B0DBD36771F80E@qq.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
Hello all,I'm trying to write a C++ DPDK example. Everything is fine until I tried to enable RSS feature. It wasn't work.After hardy works, I found it's because empty structure rte_eth_txmode. In gcc the size of rte_eth_txmode is 0. But in g++ it's 1. I known the empty structure is a gcc extension. But it isn't be permitted by C99 (6.7.2.1/7 "Structure and union specifiers": "If the struct-declaration-list contains no named members, the behavior is undefined"). Can we change the struct rte_eth_txmode ? Such as : struct rte_eth_txmode { int reserve[]; }; /* sizeof(struct rte_eth_txmode) == 0 in gcc and g++ */
[-- Attachment #2: Type: text/html, Size: 1087 bytes --]
next reply other threads:[~2013-06-12 4:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 4:54 lxu [this message]
2013-06-12 9:17 ` Olivier MATZ
2013-06-12 12:23 lxu
2013-06-12 13:39 ` Thomas Monjalon
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=tencent_30A6C31C56B0DBD36771F80E@qq.com \
--to=lxu4net@qq.com \
--cc=dev@dpdk.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).