From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 827A8A034E; Fri, 21 Jan 2022 17:21:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 681AA4276F; Fri, 21 Jan 2022 17:21:01 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 1345340040 for ; Fri, 21 Jan 2022 17:21:00 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id n11so8916229plf.4 for ; Fri, 21 Jan 2022 08:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tYFO0MJgQSGT3jqgWdiXI53vrvyRcFY+85YFflcW0HM=; b=WDMEcWBMD4U6ZWSFDXZXMx41PbGVrACZykcSFVGOYvvAx2xerjMoW85/W6EPTi7EgV Jk9d0dpNts0Le6MWFnO3/7W8+h3/rcfiePYhPOTgv4fZzI+W6XmF3PEkmAJkTOyrgcGG rbDP5hLF9xXert1Ak2orZ1jCxOB7Cg08tLU1IYnTqi67b8T2JC4yU8Sfwecsgof3ASKC t8EcScNe3VO4TubRebyf29Yh+3x8MRD5DRQaBWGtj9ergZiS4VBBy0ukXMGGryUUwvps udV/je0w5/3n0dNtC/DA5QBeqCMlIBEswqq+rXZlPoHM6xxiC9V1grt7lWdLGMy/0BHi JqcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tYFO0MJgQSGT3jqgWdiXI53vrvyRcFY+85YFflcW0HM=; b=G5P9XqqWh25q+IQasbgX0q8Yt8gP3jYHofhD70G3CEMSOSpooJ/8ENkDHhn6awbEPA lMl3bBZMljLjGzwQGJLctVYv1eNNdONZKnqTMKAlctVjtlKJhaQbQFQ4uAnf23yn1/7L yURiIKiVUeu1tdmLjDxX/IYMSqps8c/Aw++HjlibUQmbQUjXbLpKMapmNm7Lhtl8YZe5 uxr4S5UMVacXF69+v0I9V4IRfhhYSxDBXGrZuQUPiboPNmRcaCPLY7kY3oajuHuHi3hm k51di8YdDE/N5GcVFcPPKZCtmqmGchNTQYZGjXRqO8JzgeoGfL5LZ23kjtpi2qnAjwPZ B3nQ== X-Gm-Message-State: AOAM533ZASvj0oV3XSzepmJCprmjGmX7LdHEWZQ9Hd/KrxsSCee+qbNx 1qGYobKLVHYhmViTE/ENTSmzL4vougOiVcPm X-Google-Smtp-Source: ABdhPJxOiI224EodFnR5tVL8ooAe5hnNJa7O1+ZJzos1YhZimIIzzfavWWZVvXQetrHWVdOs9H9ibg== X-Received: by 2002:a17:902:d2c6:b0:14b:14d7:5bb4 with SMTP id n6-20020a170902d2c600b0014b14d75bb4mr4658079plc.37.1642782059299; Fri, 21 Jan 2022 08:20:59 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id 16sm5716087pgo.24.2022.01.21.08.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:20:58 -0800 (PST) Date: Fri, 21 Jan 2022 08:20:56 -0800 From: Stephen Hemminger To: Ronan Randles Cc: dev@dpdk.org Subject: Re: [PATCH v2 02/15] net: add function to pretty print IPv4 Message-ID: <20220121082056.0aea7ed0@hermes.local> In-Reply-To: <20220121103122.2926856-3-ronan.randles@intel.com> References: <20211214141242.3383831-1-ronan.randles@intel.com> <20220121103122.2926856-1-ronan.randles@intel.com> <20220121103122.2926856-3-ronan.randles@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 21 Jan 2022 10:31:09 +0000 Ronan Randles wrote: > +int32_t > +rte_ip_print_addr(uint32_t ip_addr, char *buffer, uint32_t buffer_size) > +{ > + if (buffer == NULL) > + return -1; > + > + snprintf(buffer, buffer_size, "%u.%u.%u.%u", > + (ip_addr >> 24), > + (ip_addr >> 16) & UINT8_MAX, > + (ip_addr >> 8) & UINT8_MAX, > + ip_addr & UINT8_MAX); > + > + return 0; NAK Broken on big endian machines. Once again, why does DPDK need to reinvent everything?