From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60040.outbound.protection.outlook.com [40.107.6.40]) by dpdk.org (Postfix) with ESMTP id 77B3158C6 for ; Mon, 5 Nov 2018 10:35:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iFqJvEMKRK26Vj5ZRVkfNqnL8sTOlNT98xSXeXCh9Gg=; b=Ukdi0Jd7FvP5FGoJuuNe69Nybn7+yD1lADMp4Zch9bPB/UWQEOfxV0BRO2Hd8ptU6uhpcd2IkMkTmHOzU9SQ4vYpiGt2+vwdVU/G1zU7+lpBtsqq6R/yC6Wzy5B0xE7tAQQuFPjaEbdQ3kzOPW128wUAj0F/eSUtZ80oCondJrE= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4SPR01MB269.eurprd05.prod.outlook.com (10.171.191.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Mon, 5 Nov 2018 09:35:27 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::61ec:ffec:5ebf:7bd6]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::61ec:ffec:5ebf:7bd6%3]) with mapi id 15.20.1294.028; Mon, 5 Nov 2018 09:35:27 +0000 From: Ori Kam To: Ori Kam CC: "dev@dpdk.org" , "wei.zhao1@intel.com" Thread-Topic: [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap Thread-Index: AQHUdOriZXhjdD3brkariKhuTw3xPw== Date: Mon, 5 Nov 2018 09:35:27 +0000 Message-ID: <1541410503-29360-1-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: CWLP123CA0099.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:5f::15) To AM4PR05MB3425.eurprd05.prod.outlook.com (2603:10a6:205:6::14) authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4SPR01MB269; 6:V/A7DFWaN7G8jZxqqiAeZJRVcu6w2fpUJRL5/+K8PyUDqfINGIimZXILikk8wGEwCoQYoZ4/0oUUoregZ8BkjD3SwCi6Kl10OS8Kf84PCVllLYbr5h75ctBg03pldalogwl76kTrhftT3DWDchOAHsyGBjomc+0rJnHEpMYrUe0+VTMm707ZIly5VcLW3xoc5xmUkdspj/NqpETHYW7y+ZtSc1J+CxkkhhQj1iQrp3mrAjwvv0W249Tsd1WML7AlemXBpLN8v6FllqBq9qMTPANeQZNwVIrQ8j6gcuOkUwCOruRmRbXDYX1v7eYMamn8sofE5p49Rg6rteTZgCDWkqQk9XQaxIdWLisSI02R7ZyprHqml6AzVxfB4xTkY9Dzuf54ZuED7CIcLrdYKK/M2MahL+LfcrAwtib6w3+Pp64xSmN9iLOv7mhii3rsXtjro1oDUczhkDO89Lb3NJsotQ==; 5:y+CHMkSzpSjTCFYTUPHxbF38UXfw3UT5ZxTNKM5R5YUGrJfWa0eWwc7H8kg4mGfJrs6hIHqlkNtPskVH6brc5T8yIcS4dezaIor8euLyq2HDwQH37p4f4DkbDuoY8PDgt5Ef4kvoZHdrrVwZF0EZT0CRP2F0nLu4bWQkTnpcsXs=; 7:96vwo1cQs1/ru6dtOHbUNLXEQkZEO63x41XdP6kZvheFvG2uSt1Jy9UgQFLISyTUH7FGUeM0tMdDAONNC1CfdEaOqmBp1fh/hFmPDiER/qBmZYiXdVXkZhF6uKKbS2xV+2Z1zkljYUEpiQArNEaRnA== x-ms-office365-filtering-correlation-id: bd235e20-d7c3-426c-97f3-08d6430204a9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM4SPR01MB269; x-ms-traffictypediagnostic: AM4SPR01MB269: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231382)(944501410)(52105095)(3002001)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM4SPR01MB269; BCL:0; PCL:0; RULEID:; SRVR:AM4SPR01MB269; x-forefront-prvs: 08476BC6EF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(136003)(39860400002)(366004)(189003)(199004)(71190400001)(71200400001)(25786009)(486006)(2900100001)(14454004)(2616005)(36756003)(476003)(2906002)(478600001)(5660300001)(6486002)(86362001)(4326008)(8936002)(68736007)(81156014)(8676002)(81166006)(3846002)(305945005)(7736002)(54906003)(6512007)(7049001)(6116002)(26005)(66066001)(6436002)(97736004)(99286004)(186003)(102836004)(6200100001)(316002)(6862004)(106356001)(52116002)(14444005)(256004)(37006003)(105586002)(53936002)(386003)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4SPR01MB269; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: cd5ZJDBWxyWLp92qmWGbl6K+7S3cem5jZ0QGI3YT1xud4Y2EngDoGOQJMQ7DYIQOwIbjwJObuD0Kg8nWu13+1ELUYSafoGZuVdFPfGtb0c9coqhVCgXP21gfPhRGUkJnQdDqPBx7seEdp9AVq6dRs5CA8Xm2UHtsYulKS2zO1oSFAfH6Wety0N5H65ThXR2/5CqUlfD02n3NykEg7R/TeMgUyPlbCRk3AiVruHdqJpKv2pwnWtCNPUopJJtD5ETKdjDZ4cjUHpFLuRYq5l+CzNA54RnpQcRY2ekmfWHTpcEICEXyAyl9EY1nZEG4xruvrBR8XG5u+WukQnEZpgfioWKp/bXzmyLvJ9XVNNq/QyY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd235e20-d7c3-426c-97f3-08d6430204a9 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2018 09:35:27.3506 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4SPR01MB269 Subject: [dpdk-dev] [PATCH 1/2] examples/flow_filtering: fix set offloads based on cap 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, 05 Nov 2018 09:35:28 -0000 Some of the requested offloads are not supported by all devices. This patch fixes this issue by setting only the supported offloads. Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup process"= ) Cc: wei.zhao1@intel.com Signed-off-by: Ori Kam --- examples/flow_filtering/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.= c index a73d120..27e287a 100644 --- a/examples/flow_filtering/main.c +++ b/examples/flow_filtering/main.c @@ -136,6 +136,8 @@ struct rte_eth_rxconf rxq_conf; struct rte_eth_dev_info dev_info; =20 + rte_eth_dev_info_get(port_id, &dev_info); + port_conf.txmode.offloads &=3D dev_info.rx_offload_capa; printf(":: initializing port: %d\n", port_id); ret =3D rte_eth_dev_configure(port_id, nr_queues, nr_queues, &port_conf); @@ -145,7 +147,6 @@ ret, port_id); } =20 - rte_eth_dev_info_get(port_id, &dev_info); rxq_conf =3D dev_info.default_rxconf; rxq_conf.offloads =3D port_conf.rxmode.offloads; /* only set Rx queues: something we care only so far */ --=20 1.8.3.1