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 5F20CA04C1 for ; Mon, 10 Aug 2020 04:56:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BCB182A5D; Mon, 10 Aug 2020 04:56:18 +0200 (CEST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by dpdk.org (Postfix) with ESMTP id 2D37B2986 for ; Mon, 10 Aug 2020 04:56:17 +0200 (CEST) Received: by mail-wm1-f54.google.com with SMTP id k20so6902209wmi.5 for ; Sun, 09 Aug 2020 19:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hPUOPKQsM0i3tKRFtS3QtafzRdMaOapuLFUjHOkBrOE=; b=cHUQt7fID6YgFwgA+KIWUbhWJ1S5RCsxD4peS5cDT3538BC7HuB6Ovhh8xQFVVI32e f/pmsxtcrvUKWZMzRiZreP8XAN++DiOaFbOyl/oCx4IGhO7edD35K779tvKnXJuvp+mp Lh+HBqM0BBQoyIin7dIEGB9uh1lQxzKSHPrJ1u7NrCGpZ262jiJskfPuyLaSfDOOYFGM 8qWVYlFrLIulVth3ND2/Y+RMbUc97picHrFB5lrGcYswaCNFU8vuO+3bNZmJkL/KCE7t 5I5RbebffR9v1AXLs1v78ewobPePbvqTmRl9cNUPchSviF+we5ZLaRSWWuPxccReGYjP DEmg== 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=hPUOPKQsM0i3tKRFtS3QtafzRdMaOapuLFUjHOkBrOE=; b=f1TFzpifgwR0Tj0BLnZ068zdBYDoueng5gvTmuhTUObkT0AknTPrB4gZdPVQUiOHar SRHcD/8aDzOW98rtpXXJ57/hzRVmzpTKyOCdSoAD1TjJ6jF75+zsC/DwMgnR+tajRVA3 WHXNcBM8M3KtW87r/M5Ylen5mvyhPn0ejI8t3lIaBTO46YWGGgBiYC95nraVsQk0ZAbu /fd9Xd33SHnimIhZgknakylqyJU52Ey+2s7OMIPq/cU4DxOFlyw2/C2ZHxOa6rEPUgKY kV4cCLS1ptJuCsKCLtkF+uvj1QGpVFoErI1v+fDcF1Eyw118N/OfQZOEWup1PwsLECml zz9g== X-Gm-Message-State: AOAM533KuA0MseswMpys8sDPC4zb/BnZ4vKx6fRTXb93TQLzNz7BRa44 rBuIbfHtz/uydpNOBaEpX2971yVgAXBzs5wa2Sw= X-Google-Smtp-Source: ABdhPJzN1ttKaYu5vLPwDzSo0bFc9LI+GJrKoypOgatm8foxnEkAsRJlUeS/zdCjDasM6+bNG/isz3OhfBgbgNX/n5I= X-Received: by 2002:a05:600c:21d6:: with SMTP id x22mr21852565wmj.112.1597028176677; Sun, 09 Aug 2020 19:56:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Cliff Burdick Date: Sun, 9 Aug 2020 19:56:05 -0700 Message-ID: To: Arvind Narayanan Cc: users Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] rte_flow() usage of htonl() for ipv4 addr masks? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" It should convert to network order, although many applications it won't matter since they use all F's. If you follow the code in flow_filtering, indeed it's using: #define FULL_MASK 0xffffffff /* full mask */ So it won't make any difference. The example should probably be updated, though.. On Sun, Aug 9, 2020 at 7:03 PM Arvind Narayanan wrote: > Hi, > > In the flow_filtering sample application, the IP's mask was set without > using htonl(). > > https://github.com/DPDK/dpdk/blob/master/examples/flow_filtering/flow_blocks.c#L85 > > Another DPDK page shows > how a testpmd command is translated to C code. > On this page though, Example 4.2 (Range IPv4 drop) has used htonl() to set > the mask. > > Any clarification on how to load the mask would be helpful. > > Thanks, > Arvind >