From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EE707A046B for ; Tue, 23 Jul 2019 16:38:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BB281C038; Tue, 23 Jul 2019 16:38:31 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 7763D1C036 for ; Tue, 23 Jul 2019 16:38:29 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id 4so13711525pld.10 for ; Tue, 23 Jul 2019 07:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AXGSbzksFxjs+jscERmQJ6/ZL9vVFwgUFXwVj5CpmBE=; b=hdMJsQ64UTmdBITOZP9VW97p8oCkFUcDTk630GYqJzA2Wtx8lODQeK4boBrjueN90F mtRtlTY1fr1m40PkjQQBQtMCCCPXe8cRkOUZg8KJqYLoAsYfdsnfSNTaOwD+29tEldCJ 9FikS+ntvnnrdnGRe1YNyUq7iFLbpGVONePcRo7U0pAzTZvPe1KVB7bSojLZ9L8XCuzj GJ9V7s3EalheqQsFYITKIEb1k9W/z09NChExyJVuIUzHBTgQLTsPpoS6Sq8azW6vIZYp 5WuWGZyEBOxJ9y3QuzIRMXfDoGhX25yQ5PwzJgurSJ5r7hyCthsm/UswQtpXFIu8mjyl c4vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AXGSbzksFxjs+jscERmQJ6/ZL9vVFwgUFXwVj5CpmBE=; b=U+4qrd3p/OffxMW9QNVrB8q6YhJB/21lICH+zpvtpzDswjsbW85hUcFhCRq/tuzFlg BLDX/vnoNxqqITrXLkyN66rbR8pQB2t4YV34x39DeSV+WDsF/9Pfyv6BknjCPJmZd4Sb OIAqOHwcEyjQ5Eoyr6dK/+ZXX0qdKeoqr2eFWz/Kqn8dRn7OTiaHWW7PhrH50jHCnU7Q z+OCK59R59J9faIzB9GlFisAmzaJFoZu/hHrg0wyvarO8/w/8wMsdsX/DNvJi78B9kTU BnVlgO6C8t2E6nmGhiZuQ1IdZTKVabEgYWYXkXziwv6Lhh878dNaThckRnn4jBio43ai gsKQ== X-Gm-Message-State: APjAAAV93skvLUdcjT1FNAb2xLRTHqp4OsaOlzP5wscgKEkKuWQCBVxa BRGfidJoBbfMBxaSQEkwJko= X-Google-Smtp-Source: APXvYqx0PGn8rPPYjszryJm1STSkJ81OrZvDVYFNMPNek/X9FlPe9pHRipZVcXeDFQZL6OEmX6kg4w== X-Received: by 2002:a17:902:7686:: with SMTP id m6mr80724471pll.239.1563892708585; Tue, 23 Jul 2019 07:38:28 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id p1sm46774472pff.74.2019.07.23.07.38.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 07:38:28 -0700 (PDT) Date: Tue, 23 Jul 2019 07:38:21 -0700 From: Stephen Hemminger To: Andrew Rybchenko Cc: Thomas Monjalon , Ferruh Yigit , Message-ID: <20190723073821.6cf51bcc@hermes.lan> In-Reply-To: <1563890871-26901-1-git-send-email-arybchenko@solarflare.com> References: <1563890871-26901-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] doc: add deprecation notice to fix ethdev API returning void 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 23 Jul 2019 15:07:51 +0100 Andrew Rybchenko wrote: > void return value is bad for get API (like rte_eth_dev_info-get()) > since caller does not know if the function does its job or not and > output value is filled in. > > void return value is bad for state changing API (like > rte_eth_promiscuous_enable()) since caller should use get API > to understand if state is really changed. > > Signed-off-by: Andrew Rybchenko In general this is a good ide, but for some API's it is hard to think of a way it would help. For example: void return is ok for close routines because if close() returns an error the application really has no choice about what to do.