Hi, last week I sent a question about VMDq and I did not get any reply. Today I'll be more generic rather than last time, and I hope someone will clarify my ideas. Through the DPDK framework, is it possible to make a pre-filter based on some header parameter directly on the NIC (in addition to those on vlan id and vlan priority used in the example applications)?
I already tried to use these functions: 1) rte_eth_dev_mac_addr_add : I used it with the NIC configured in VMDq mode static const struct rte_eth_conf port_conf = { .rxmode = { .mq_mode = ETH_MQ_RX_VMDQ_ONLY, .split_hdr_size = 0, .header_split = 0, /**< Header Split disabled */ .hw_ip_checksum = 1, /**< IP checksum offload disabled */ .hw_vlan_filter = 0, /**< VLAN filtering disabled */ .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ .hw_strip_crc = 0, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, }, .rx_adv_conf = { .vmdq_rx_conf = { .nb_queue_pools = ETH_64_POOLS, .enable_default_pool = 1, .default_pool = 0, }, }, }; When I use the function above, the NIC discards all the packets with MAC source address different from one of those I added with the function itself; moreover, I receive this packets only if I enable the default pool in the configuration phase (otherwise no packet is received). 2) rte_eth_dev_fdir_add_signature_filter: this time I used another configuration for the device, but I think I do some mistake (it is so bad do not having a good doc about this stuff) .rxmode = { .mq_mode = ETH_MQ_RX_NONE, .split_hdr_size = 0, .header_split = 0, /**< Header Split disabled */ .hw_ip_checksum = 1, /**< IP checksum offload disabled */ .hw_vlan_filter = 0, /**< VLAN filtering disabled */ .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ .hw_strip_crc = 0, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, }, .fdir_conf = { .mode = RTE_FDIR_MODE_SIGNATURE , .pballoc = RTE_FDIR_PBALLOC_64K , .status = RTE_FDIR_NO_REPORT_STATUS , .flexbytes_offset = 0, .drop_queue = 0, }, }; In this way, the device does not start, although it is a x540 (hence it should support the FDIR_MODE_SIGNATURE). Regards, Mauro > Date: Wed, 4 Dec 2013 19:28:39 +0100 > From: mauroannarumma at hotmail.it > To: dev at dpdk.org > Subject: [dpdk-dev] Question on VMDq mode > > Hi, > I'm trying to use the VMDq technology for pre-filter packets on the > NIC;unfortunately I found only two examples about this, and both express > conditions on the VLAN tag, while I need to select packets based on > their (source) MAC address. > After looking to the API, I find out the function > *rte_eth_dev_mac_addr_add*, which requires the parameter *uint32_t pool* > (VMDq pool index to associate address with (if VMDq is enabled)). > > My questions are: > 1) Am I on the right way to achieve my goal? > 2) How is it realized the mapping pools/queues? > > Regards, > > Mauro