From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D79C61B040 for ; Mon, 8 Jan 2018 07:31:38 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2018 22:31:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,329,1511856000"; d="scan'208";a="9435731" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 07 Jan 2018 22:31:37 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 Jan 2018 22:31:37 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Mon, 8 Jan 2018 14:31:36 +0800 From: "Zhang, Helin" To: Ori Kam , "Zhao1, Wei" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] examples/flow_filtering: add Tx queues setup process Thread-Index: AQHTfwlh86XDKnQyHUK75egjnVJ6naNplniQ Date: Mon, 8 Jan 2018 06:31:35 +0000 Message-ID: References: <20171226094905.83277-1-wei.zhao1@intel.com> <20171227083215.112330-1-wei.zhao1@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] examples/flow_filtering: add Tx queues setup process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 06:31:39 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ori Kam > Sent: Wednesday, December 27, 2017 7:53 PM > To: Zhao1, Wei; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] examples/flow_filtering: add Tx queues > setup process >=20 >=20 >=20 > > -----Original Message----- > > From: Wei Zhao [mailto:wei.zhao1@intel.com] > > Sent: Wednesday, December 27, 2017 10:32 AM > > To: dev@dpdk.org > > Cc: Ori Kam ; Wei Zhao > > Subject: [PATCH v2] examples/flow_filtering: add Tx queues setup > > process > > > > This example do not has the process of set up tx queues, but some NIC > > start up process will be blocked if this is no tx queue and only rx > > queues. So add tx queues setup process in main code. > > > > Signed-off-by: Wei Zhao > > > > --- > > > > v2: > > -add support the new tx offloads. > > --- > > examples/flow_filtering/main.c | 26 ++++++++++++++++++++++++++ > > 1 file changed, 26 insertions(+) > > > > diff --git a/examples/flow_filtering/main.c > > b/examples/flow_filtering/main.c index 7d739b4..4a07b63 100644 > > --- a/examples/flow_filtering/main.c > > +++ b/examples/flow_filtering/main.c > > @@ -149,7 +149,18 @@ init_port(void) > > /**< CRC stripped by hardware */ > > .hw_strip_crc =3D 1, > > }, > > + .txmode =3D { > > + .offloads =3D > > + DEV_TX_OFFLOAD_VLAN_INSERT | > > + DEV_TX_OFFLOAD_IPV4_CKSUM | > > + DEV_TX_OFFLOAD_UDP_CKSUM | > > + DEV_TX_OFFLOAD_TCP_CKSUM | > > + DEV_TX_OFFLOAD_SCTP_CKSUM | > > + DEV_TX_OFFLOAD_TCP_TSO, > > + }, > > }; > > + struct rte_eth_txconf txq_conf; > > + struct rte_eth_dev_info dev_info; > > > > printf(":: initializing port: %d\n", port_id); > > ret =3D rte_eth_dev_configure(port_id, @@ -173,6 +184,21 @@ > > init_port(void) > > } > > } > > > > + rte_eth_dev_info_get(port_id, &dev_info); > > + txq_conf =3D dev_info.default_txconf; > > + txq_conf.offloads =3D port_conf.txmode.offloads; > > + > > + for (i =3D 0; i < nr_queues; i++) { > > + ret =3D rte_eth_tx_queue_setup(port_id, i, 512, > > + rte_eth_dev_socket_id(port_id), > > + &txq_conf); > > + if (ret < 0) { > > + rte_exit(EXIT_FAILURE, > > + ":: Tx queue setup failed: err=3D%d, > > port=3D%u\n", > > + ret, port_id); > > + } > > + } > > + > > rte_eth_promiscuous_enable(port_id); > > ret =3D rte_eth_dev_start(port_id); > > if (ret < 0) { > > -- > > 2.9.3 >=20 > Acked-by: Ori Kam Applied to dpdk-next-net-intel, thanks! /Helin