From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dub0-omc4-s18.dub0.hotmail.com (dub0-omc4-s18.dub0.hotmail.com [157.55.2.93]) by dpdk.org (Postfix) with ESMTP id 856CE2A9 for ; Thu, 12 Dec 2013 18:03:33 +0100 (CET) Received: from DUB111-W45 ([157.55.2.73]) by dub0-omc4-s18.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 12 Dec 2013 09:04:38 -0800 X-TMN: [/CvRzq9DzidUME+zmfTwUTebeQSryOoJl9mXwTAh+Xc=] X-Originating-Email: [mauroannarumma@hotmail.it] Message-ID: From: Mauro Annarumma To: "dev@dpdk.org" Date: Thu, 12 Dec 2013 18:04:38 +0100 Importance: Normal In-Reply-To: References: MIME-Version: 1.0 X-OriginalArrivalTime: 12 Dec 2013 17:04:38.0731 (UTC) FILETIME=[3DDDA1B0:01CEF75C] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Question on VMDq mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 17:03:33 -0000 Hi=2C last week I sent a question about VMDq and I did not get any reply.=20 Today I'll be more generic rather than last time=2C and I hope someone will= clarify my ideas. Through the DPDK framework=2C 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 mod= e=20 static const struct rte_eth_conf port_conf =3D { .rxmode =3D { .mq_mode =3D ETH_MQ_RX_VMDQ_ONLY=2C .split_hdr_size =3D 0=2C .header_split =3D 0=2C /**< Header Split disabled */ .hw_ip_checksum =3D 1=2C /**< IP checksum offload disabled */ .hw_vlan_filter =3D 0=2C /**< VLAN filtering disabled */ .jumbo_frame =3D 0=2C /**< Jumbo Frame Support disabled */ .hw_strip_crc =3D 0=2C }=2C .txmode =3D { .mq_mode =3D ETH_MQ_TX_NONE=2C }=2C .rx_adv_conf =3D { .vmdq_rx_conf =3D { .nb_queue_pools =3D ETH_64_POOLS=2C .enable_default_pool =3D 1=2C .default_pool =3D 0=2C }=2C }=2C }=3B When I use the function above=2C the NIC discards all the packets with MAC = source address different from one of those I added with the function itself= =3B moreover=2C 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 configur= ation for the device=2C but I think I do some mistake (it is so bad do not = having a good doc about this stuff)=20 .rxmode =3D { .mq_mode =3D ETH_MQ_RX_NONE=2C .split_hdr_size =3D 0=2C .header_split =3D 0=2C /**< Header Split disabled */ .hw_ip_checksum =3D 1=2C /**< IP checksum offload disabled */ .hw_vlan_filter =3D 0=2C /**< VLAN filtering disabled */ .jumbo_frame =3D 0=2C /**< Jumbo Frame Support disabled */ .hw_strip_crc =3D 0=2C }=2C .txmode =3D { .mq_mode =3D ETH_MQ_TX_NONE=2C }=2C .fdir_conf =3D { .mode =3D RTE_FDIR_MODE_SIGNATURE =2C .pballoc =3D RTE_FDIR_PBALLOC_64K =2C .status =3D RTE_FDIR_NO_REPORT_STATUS =2C .flexbytes_offset =3D 0=2C .drop_queue =3D 0=2C }=2C }=3B In this way=2C the device does not start=2C although it is a x540 (hence it= should support the FDIR_MODE_SIGNATURE). Regards=2C =20 Mauro > Date: Wed=2C 4 Dec 2013 19:28:39 +0100 > From: mauroannarumma@hotmail.it > To: dev@dpdk.org > Subject: [dpdk-dev] Question on VMDq mode >=20 > Hi=2C > I'm trying to use the VMDq technology for pre-filter packets on the=20 > NIC=3Bunfortunately I found only two examples about this=2C and both expr= ess=20 > conditions on the VLAN tag=2C while I need to select packets based on=20 > their (source) MAC address. > After looking to the API=2C I find out the function=20 > *rte_eth_dev_mac_addr_add*=2C which requires the parameter *uint32_t pool= *=20 > (VMDq pool index to associate address with (if VMDq is enabled)). >=20 > My questions are: > 1) Am I on the right way to achieve my goal? > 2) How is it realized the mapping pools/queues? >=20 > Regards=2C >=20 > Mauro =