From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0069.outbound.protection.outlook.com [104.47.37.69]) by dpdk.org (Postfix) with ESMTP id 55258108D for ; Fri, 31 Mar 2017 15:37:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jvAL+Sx7gn/4Pafz+iUVZ10ZRymrOLjR9zjbEfPCnvg=; b=BIqrbJmV8yaX/POO2fKXSREiZxOddI57+23WCE7xhH7Wx2Jh2PefuXhJnDvNk5So+vfO0XjZAOwQneT9SZ/wk6x65hYnSD+tdJSVomf7SzFyyLw3RL7xaHhG9LXlt09Ec/K0UCeUCdH6aEw0Y23dCeEqamIvwarwUFDVKsDUQVI= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from b.semihalf.local (31.172.191.173) by BLUPR0701MB1027.namprd07.prod.outlook.com (10.160.35.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Fri, 31 Mar 2017 13:36:58 +0000 From: Andriy Berestovskyy To: Cristian Dumitrescu Cc: dev@dpdk.org Date: Fri, 31 Mar 2017 15:36:33 +0200 Message-Id: <1490967396-2240-2-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490967396-2240-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> References: <1490967396-2240-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: VI1P195CA0004.EURP195.PROD.OUTLOOK.COM (10.175.187.14) To BLUPR0701MB1027.namprd07.prod.outlook.com (10.160.35.19) X-MS-Office365-Filtering-Correlation-Id: 20e4b762-6775-47da-4ff8-08d4783b0163 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1027; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1027; 3:Ula+6zxtgc4IIQkOOmTvOZOx8sSVq33erRJvN5PVdwnID0xT1SQKB5tKHvFuI+g2jwOqhiIiYFJWTSCanKumN+WCINLxlkmPYsZaRCTUwZg2s4iD4pqx1406exrKRJX6LG3L5/bYEwOfXRrYmVoTYQi7hSBanbDAdmuRXAsFR2ahbXopZq8MoFE07oToJfQMGjKMc81Y0JskSMkgDJOguasnLW4pRng16/VNxj2jG+U7tsd3pB0lEuZND44bb774ZXaJFE3UhwWitSiqh4MuukBph8C2pOkv0Y7eFeSeCkArF4OsXaDQGvyuJMMX6hIRndh+YOjrbswvmADkOVK0kQ==; 25:7iQEeWTHwxZkELJvm0paJxnZonSXDbxO37LlKltTH9trhGiWhgRmUbpqMcwPPVS1PiUSbCAEYX93iR1jCxtOjH5EbDE2Bksvfv7InW7pOqkipSY6Lb5YUWkwpr5tXYKgKPW8ISeMgCSI81StxqVqV7ni5AR2rqbTgNQncDoN1O0nukirLqsw9xrTRJHADSv35UxyJVHwfJjkyIZU19YUX5si2Be+yHpfQgms3u0oMx5v7f1hbNxKp+i75AyW8nJrMx19w2YptySHR+QSPNRJlOdB6JUoi6ffKSMgQ9jxSyUvL+EXZ18LXlHT1asm1HF6NXQSeltw0lfssfm/o2k+pgjuo7ki/lsxj3B1Ee0M/2T+BuqBTOR1PcMNNjbKK2TkzZltZjpcyG0nuflFjVCguxJsJWdIIrZOYx4HAL+QNqqMhIKv/hphOsfdc9AfoaKE3LkcWun5NjduEf1f82S/oA== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1027; 31:tXslI1+ui82IQOEWV4yaNUEt48Xsdy5eiafvIiFXThPfsGvYLhuVQ62V7QKqNg5AJYDqExhvFdLBHFWOCZdEkQI1l8Vgb1Chig/hTpY+bbjwH0shAVeyAITzsDI+4FG1xJVXLXi+sWPb5aErHN6OhRc+6AOAzfUAq4URFQKb4pa7xB6BwwUbDvID2weELLhYplha2OwWAe8Kh9EwoV/5C0ceCHwPBKjYdsR3niG9nEh4HtCC3Iv5oSGJICcRhcUpxVDIkPqfANVPLJ296n3d+A==; 20:fOBlF/17ka9NQir/th/JoaRGgjKF0PNkORYftoZYT5HR/uNpyBfTARmWXZFtSFVxqWckBy5hnbX4ds5wPakHlCHfovkzFIwj/17r3jpkSecNuLRviHZcgW6Rn1gKgAgKU29v5RA+bM3RKRQY6k0I5uEMBy2JiT6PsfxF3Avhspjmy+E/dWEEoNadaT7yPFCWo54bPDcs4iNqh5nw3Jf7i+7S8MVwjoTY3G9RN8+ugJyik4rvaEPu3O0+WhkL8QaQLb+1bCcNXOG3E7OzEK604qcp1JKmJLn5haCPZupJ4PsiAGCAwAOcYuEV58d2y4l+GIQMT5SFaAD0Qb033Y7A4POJkILJvOTApPT8O6HMpgCIkgS7s1nvKeG4yec8G4EWfU/oTk9GynI+c54g7fgQJHgmQWs+J6qwgjsEFyUlOVnAXV/9v9u/VKgkl/KzCau61CKEJg9up48RYUyC01lMqzuERSv2QLVtXAoDld+RHJcgrpxEAV4G+vkt7Gke1PzO/uF+j2bwx8BhaOGfufv6mYy2E+1Q7PEpkj0lkTf2rCV5jalLlJ46+6HH6Gd9ekZckbkl8IypgL9w/oVvryXNlrV991A+DzixsZ5hi00nj7s= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123560025)(6072148); SRVR:BLUPR0701MB1027; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1027; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1027; 4:m1J3fc0LNbxdvHfcs4hUk22nTJEfWqq5gveQL+uhxhArIUjGCjHS9zF/YN9dEr194BIKnFhbbzN/GoMnXZHSvwiOHCJT50u8e5bGNmOs9Jqzv2JMtQ7CPP9Itm1c7yBiuo+XR+Pq2ku6Zj8jbRToZ+1kqEqzLjQQ8xr+8UXNWyqiSGi3yl81d9llIL32fE6bkC4Z5vJy8ml1dZ3URr4vRNq5+YbxL/LiA9sZhOTeCdcCA5jveIVIWC2tkvGFGWv++Wel5Id0ZhKyYCyqnIe7ZaxoIIuA58XvcMNlpSv+zBJLUky//P3EjwCToXnsXwwmDCUUBH0I1ZaQc8tvDey8jhHvWNJ7KVHV73GYuFui8F7IYDJTfv3xy8HXe7BP3KqSq/pG3fRsLUJl82hRgnAg8ipM2e3/IB54DIWAyY+ZEXEYQN9z1nGA/O+R8HaVl2a4gJ9VfawMKwjpSsZ/EPN7ygKoWKPUVflIjaqo1iur0zzlFY/NALI8q7nsfEdl+bC2dUpN5TP+E9Ess/wOEK/ynrnVo3nu/UbPihSChuGRi1FAPlfjx5lBPGR/wcnJ80ffrr002i+W0nbtYrVvWJcmOlchYubZpSK8Kn6zDtfBAjeECHp8ARwqJGnLKwXb6BZLB6udalUtEIGEuduMOlilUziI5/cr+yb8aCn5k1vcoOqX0gOtEb+6gVQcOk3pS9flqXJ6qtnJf4GqYMCG4sf1Kg== X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39840400002)(39850400002)(39450400003)(39400400002)(53936002)(76176999)(189998001)(50986999)(6512007)(66066001)(305945005)(7736002)(47776003)(6116002)(3846002)(6506006)(6486002)(2906002)(5003940100001)(8676002)(48376002)(5660300001)(81166006)(110136004)(38730400002)(50226002)(36756003)(4326008)(2950100002)(42882006)(42186005)(6916009)(6666003)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1027; H:b.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1027; 23:igehXT1K7yPYQmezKcsPkzNGytHGtsovk0XUNj/?= =?us-ascii?Q?CsWXfyM190rz09AM1WDtj9E9cSNnvYcjoqAMuWtQ/XoO67bF3smYbkWylk4S?= =?us-ascii?Q?7CwIYKPEIlYBelpokua8Lhvl+c2IylY1EQtaSapMZ1srH5hb5hUX9tUIV423?= =?us-ascii?Q?gNbdTvDBRYz9D6fUYvrt4tPolK0VpnLk8nDJbFWPjodOS2mZ8wd2hMw+tgRe?= =?us-ascii?Q?alUk2GVCACJkGmr7srZfTygEoOC8M/DwPs4NlbaoIWsTu+nOFDOxQOOGGB6N?= =?us-ascii?Q?xzI5rb9epy9We493nOG8GqMFan6UIb+qyRU6ytztJK9vQlpL6Y0IhPYrWub/?= =?us-ascii?Q?BSdIlDzkbhUtwDEWG3bnk1mCaOwrnZYZV+mxcQDPXi7/yIkzyv6mXK7mn01F?= =?us-ascii?Q?pb0aujXRrWg4nRXHoVDp+o2gUkvWjIMmn/Y9B9AjH91tQ8FLIBpEO+gswop8?= =?us-ascii?Q?4s3KK7BhTcDf8YcjAiwPROJrpbGTmEpBpDXYJjFvcIHfhcp5mUEwZ5H281IZ?= =?us-ascii?Q?PAN5kJShNTlEquV6WdRK/xKuc77v3P7qFUjKP51iAsB3CJGgrL7yI/+WFdkS?= =?us-ascii?Q?tyU8xdZNtIuJxAmbddi5XVe66xxZj4VKUJbmSTeghjHoq7MKtwE5BbjoiKFR?= =?us-ascii?Q?zgWOSpoguvfEmpgglYqsNgpJLMmvtwWiXiC3dKhzBbUCpYhjfE5h8xSjFs3a?= =?us-ascii?Q?QKNG0OzBV2XGgNXIkMZ5e0ePwJXWlutHZz1WXBbxYv1Zja4fDzaH9YSztPpo?= =?us-ascii?Q?lzc43p2jgeWWt3anbb03JZdBKIgVScKwWwMYNheL7lnw6vLg8ogKju3LPc5I?= =?us-ascii?Q?7TCpWlmza39th/Tnzn7YoRHhVytunxVk85H79DrsiSKoytE4xckCPAlpaPTd?= =?us-ascii?Q?99p0A6RxYP0rBawRr5+wMRWag35ZVSCM7M7gC9S2Qly7HE1Ub1PZpVmBsiPk?= =?us-ascii?Q?LYvM6x6jgphRAJIrE+J0qDRrEHHBLq3H59ZqmnXm0wg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1027; 6:8fRD36P1g0ePZ3x2c8DDdM+CTDBrPCD00OxKozmVJxeIMU5JkOg80zOP/jwjppm+kwhz6oclx7iLu52hgPQxL/bipTCNh8GbRfvFaE7RQcaUKF2FjC/lqveWDfv1wNxuix2W6XeWqsbAzGeCfAZgd2DQU8Xxz2gU6ZUZXTAEKfJEIbKzvDWOFFS4//dqc1VaoVXYsjdwDoSILPsxDztuOuAwUl1Tb3tGOp1ze39HUsaSvndiApoYLW5Nt9KDqzrnel+YWL0Kz9FjDxxqimuattak5EUcqWbwPdFqQLAhA6d3SuBZyfhlqJc0AEkrhIz8luCo/4RRTC/T1DFnlwqTgJF0LFsY5YAtRCLYm1+m9kUuLncSY6HXaQEu+P/+Fg92aLoeviBI/0QERvBW8ll7HQ==; 5:lOdLn0KIQsmz3N/2TJ477gfPKIKq2gcxV0aO+4/mKDvQr4a4VqqUONXPAJURxfUqqGKe4eJ01F6BaL1ciSM5nw0G+1I1ERh3aQ7E5blcawZYGjPsQWMgCh4VY4Afd+/X2JMsAasDP0VX0zQUMIiHcC8jSssfZy02r7cIoGE5/hM=; 24:QkftbMxMI8i29LhAP8No/mIy+iik/IcH9HO9RR+W0AICVHjh7Xx6y/7meFFLAZaofqPKBTlawibQ345lMpCMHxfa888aWmzBfKxrM2rrNnU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1027; 7:YfxghB6d2hKKrJ7OBcRbv4BEh0a/W/qJQl0sS3CETv2GFHRBovsaKdckwKFO5YhUR8lotZ7RdEIgf5DvJQ/eoHXIcG/uYv0DHA9m/YFmUWEk/Pqzz50v7A5ZqRb06Snujg3uE75dL49qmerHr1uV3kvlMvQoBrwTHbVfCuJc+8sCGWAjIP8o91w8gZL1opffKIXbzkT2VJ21P4BmpZIA8uxSDHSXBxp9ABXJsbd/dTOhamzS1wxTrlh4FUt5fXMMFC7HRx3kPNZOU5UFXldWIO7ioGnmtok6YexFcwtx8O2JCazJ7isEFfAetCtH/YNn61YlORU/u5RRU+jg26t3mw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 13:36:58.3084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1027 Subject: [dpdk-dev] [PATCH 2/5] examples/ip_pipeline: avoid panic if link up/down is not supported 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: Fri, 31 Mar 2017 13:37:00 -0000 Some PMDs (mostly VFs) do not provide link up/down functionality. Signed-off-by: Andriy Berestovskyy --- examples/ip_pipeline/init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index 1dc2a04..be148fc 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -717,7 +717,8 @@ app_link_up_internal(struct app_params *app, struct app_link_params *cp) /* PMD link up */ status = rte_eth_dev_set_link_up(cp->pmd_id); - if (status < 0) + /* Do not panic if PMD does not provide link up functionality */ + if (status < 0 && status != -ENOTSUP) rte_panic("%s (%" PRIu32 "): PMD set link up error %" PRId32 "\n", cp->name, cp->pmd_id, status); @@ -733,7 +734,8 @@ app_link_down_internal(struct app_params *app, struct app_link_params *cp) /* PMD link down */ status = rte_eth_dev_set_link_down(cp->pmd_id); - if (status < 0) + /* Do not panic if PMD does not provide link down functionality */ + if (status < 0 && status != -ENOTSUP) rte_panic("%s (%" PRIu32 "): PMD set link down error %" PRId32 "\n", cp->name, cp->pmd_id, status); -- 2.7.4