From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id E5A262C65 for ; Wed, 6 Apr 2016 16:34:37 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id u206so48574433wme.1 for ; Wed, 06 Apr 2016 07:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=d0sjHETgqnxgORoFN4/HdToT4ULs05k4J36q+z6lU7E=; b=i6EBBlKQAsdSUQEcOXDLRFvCLF5eIPtTuMk9capFo59VFzBOsrwr/nAR7nYGvsZSFo jyCFHsog9ofjPCGVShY/h4qR0TFX/sOu5LY8oCEgR8wLD3WkyL5R0ZVCAbP+7pvWlI2O JkMFsZSRR47l45KICLU4S0lRLV58QtJGhFMNY/jWijpaTgIftKtkkZo6lS72+9Vdsc8l tnhsphtWucEChFNbnlpvcZB94O9uAJfBp3mghyxAXK9S392JrRgp/2/rJG36WqjQ3TS6 8PSMCcmX+EXCTsq2veiJRhEhls6pUlos1/CzW4CYnyIMKzp/jhEuoW4S1G7vkxUD9jf/ 9sLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=d0sjHETgqnxgORoFN4/HdToT4ULs05k4J36q+z6lU7E=; b=YDPknkmL8FKvrZ86d/jdVUeGiaHHov3eGon05hUzESBFgCQ9ZK4DVKH7unI66D03/R FEJtT95CFgSNo7SKPmDsT2qqey0fEvhux9aioIR4SXLrfFul5QSz2HrFiycf2UNqI6kG yiabh5Z5Pw/Ru5Efh6iTuxwu1tsD9v8MCIWE/T0nRTmX9dA4WPwQr39WjG9s2nSHIcjM I4w3ITo+B3yF7ArhzzRx9cBvKF57C4qqw1QugmJOVZx1SiJQHiUrUxXi0krPUHjG27Qs ragheeRK/Ltt/dmhEbWMfOPjFKTBkiuNaM9LAvqPojblhV5p32/pNB3Ndo9c41eMHybM ilsQ== X-Gm-Message-State: AD7BkJIl/sAL4h7PnQkICgTKRKPArCxTBX/Q6GU+mrGS+1ZpfjLw3efGAfx5H8uxLhWKabB2 X-Received: by 10.194.175.196 with SMTP id cc4mr21796479wjc.109.1459953277758; Wed, 06 Apr 2016 07:34:37 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id w184sm4064298wmb.1.2016.04.06.07.34.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2016 07:34:36 -0700 (PDT) From: Thomas Monjalon To: Jianfeng Tan Cc: dev@dpdk.org, konstantin.ananyev@intel.com, bruce.richardson@intel.com Date: Wed, 06 Apr 2016 16:32:58 +0200 Message-ID: <4577590.9NgA58xFzY@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1459914673-27716-1-git-send-email-jianfeng.tan@intel.com> References: <1458875736-56444-1-git-send-email-jianfeng.tan@intel.com> <1459914673-27716-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] ethdev: refine new API to query supported ptypes 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: Wed, 06 Apr 2016 14:34:38 -0000 2016-04-06 11:51, Jianfeng Tan: > This change is to make user code simpler. For PMDs which do not fill any > packet types, return 0 instead of -ENOTSUP as suggested by Bruce. > > Usually, users only care if the required (by ptype_mask) ptypes can be > filled by the specified PMD. If the PMD implements dev_supported_ptypes_get > func is not important. And the introduce of another return value (-ENOTSUP) > would increase the complexity of user programs to check it. > > Besides, there are ways to know if a PMD implements the func: > a. see doc/guides/nics/overview.rst. > b. use (~1) as parameter ptype_mask, then check if return 0. > > Suggested-by: Bruce Richardson > Signed-off-by: Jianfeng Tan > Acked-by: Konstantin Ananyev Applied, thanks