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 0C2E7A0093; Tue, 19 May 2020 11:18:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DED791D17A; Tue, 19 May 2020 11:18:19 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 6D9161BFF6 for ; Tue, 19 May 2020 11:18:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589879898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lKZMsqcK8PDpC3OIPWkY9omt3uWQScAJ+eQQI2HdR2A=; b=WIJwZ102iYbYjTg9WwS7f+HFt3sferCU5lDoRE0IQuIJ5ZjB7Bktqre1ucrIhrUffKeNk+ pWceZ9rLDdfoEqdqk7xhntqYghrS8dHfu6MlRlrzWz0HA6D5IIbZbmSN4YtVdYJ+tcNZzd TDFDZOys2Evy0cnUAdB09Oc9FILiymw= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-xvQXP6_PPnuOHON_owjadg-1; Tue, 19 May 2020 05:18:17 -0400 X-MC-Unique: xvQXP6_PPnuOHON_owjadg-1 Received: by mail-vk1-f197.google.com with SMTP id s206so5648372vke.20 for ; Tue, 19 May 2020 02:18:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lKZMsqcK8PDpC3OIPWkY9omt3uWQScAJ+eQQI2HdR2A=; b=j7yCix4WwcpZSs9KPOyLbYmIa+vSehhmEaJPK8U8bBz3d/Eprm30j9p/OH4MzRLviN 4/7ooBfpVvduDvhzzi38Z4/nPIM8dtzNwpmQiyLGsGnHtefLlDvZn+jzMAyfEVYoECSy OYQc/3GkZZvJDGL29IgP/AhG+PhP2EYZOVBJVXuGdtToYcep5/OuDkSjxynQzEM+KOWH jnWSGZgi0euM0LwesPZNv94tjmbFxp7CKAO6POmeiWyuEQh+UY2a8yKzgzz7RcYv+fVH DcGWF0FLirpjA1l0SEi/lFon/WyTu7L9W5uHN4XrJv3GtbgHFMWuqQ1sBlN2vAbSaDH6 Y2ZA== X-Gm-Message-State: AOAM532xdV2LmzNzANeZ3DW6xqo9frtPa6TxTFhtCkhByfHqhi6IVc/9 51OmsO4SNq6jLVUReEYoiKaMBRtpxnxD1O51JYzBRHjygYm1DRo6ffKv7cq7TzGwt/BVWFCKUT7 GTgDNqPCIzwM9J6zp1us= X-Received: by 2002:a67:1e03:: with SMTP id e3mr4619349vse.198.1589879896729; Tue, 19 May 2020 02:18:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrIuJWGq6JfQkm2dkVuCznJhqwJ9kqSsMDZegWK/7WKHmupp4l+dgGnFhMYl2iiONeC+QkOcTcPnKewN4Hd/4= X-Received: by 2002:a67:1e03:: with SMTP id e3mr4619325vse.198.1589879896217; Tue, 19 May 2020 02:18:16 -0700 (PDT) MIME-Version: 1.0 References: <20200513104751.46466-1-grive@u256.net> <20200513104751.46466-3-grive@u256.net> In-Reply-To: <20200513104751.46466-3-grive@u256.net> From: David Marchand Date: Tue, 19 May 2020 11:18:05 +0200 Message-ID: To: Gaetan Rivet Cc: dev X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v1 2/2] pci: explain how empty strings are rejected in DBDF 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 Wed, May 13, 2020 at 12:48 PM Gaetan Rivet wrote: > > Empty strings are forbidden as input to rte_pci_addr_parse(). > It is explicitly enforced in BDF parsing as parsing the bus > field will immediately fail. The related check is commented. > > It is implicitly enforced in DBDF parsing, as the domain would be > parsed to 0 without error, but the check `end[0] != ':'` afterward > will return -EINVAL. > > Enforcing consistency between parsers by reading the code is not helped > by this property being implicit. Add a comment to explain. > > Signed-off-by: Gaetan Rivet Acked-by: Darek Stojaczyk Applied, thanks. -- David Marchand