About struct in C

时间:2022-04-26 20:07:32

something new:

to set value in struct can be

About struct in C

in case i cannot view picture.. i write the snippet here ..

static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
.max_rx_pkt_len = ETHER_MAX_LEN,
.split_hdr_size = ,
.header_split = , /**< Header Split disabled */
.hw_ip_checksum = , /**<IP checksum offload enabled */
.hw_vlan_filter = , /**<VLAN filtering disabled */
.jumbo_frame = , /**<Jumbo Frame Support disabled */
.hw_strip_crc = , /**<CRC strip by hardware */
},
.rx_adv_conf = {
.rss_conf = {
.rss_key = NULL,
.rss_hf = ETH_RSS_IP,
},
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE
},
};

the dot punctuation means the member of the struct, that being used, member can be assigned without accordance to its order.