From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 5F2B61C726 for ; Wed, 4 Apr 2018 16:58:08 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id l49so23202273wrl.4 for ; Wed, 04 Apr 2018 07:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AAIvojEaisGZR/QZzAFiB1iJ/sAfLfxaPOluU9ROLiY=; b=vg6YB9hXej7+p/fVSGPE7LV2Eet8aqpPYwAEULAdjCoNpU5lp61zI6rmBQuHImTVzs aRDUeD43alXw95oXHeGhDRS/6C+x1obtf5RGixBFdemxUZf1KgC5BnFL0F5o0kSEIAT0 Kbb5e3pYCewt8HrTLL5q4Af5WMUKz1tdWyBRAJxbyjtoK453liqjyTcAV1AUY6HzXDXC 3UzUSxgXZ6QD6URqInXMM6JbhRiXhh7M6BB4FfRnXK4FDJwvpEf+LEZYCFBGGepQVv6a M92xlNdv1aPsuZm4Fmp+r+dGTEDYCn/ncQMQcbaDRFQi3QtN7D1JvwRJDEtqxlxxsrro vKsA== 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:references :mime-version:content-disposition:in-reply-to; bh=AAIvojEaisGZR/QZzAFiB1iJ/sAfLfxaPOluU9ROLiY=; b=BVL7fvVonhjI+KR6oCo5VpvR4ziYujzKz1R2zp33831tHGH6nEPJiF0VcSx3D7YWZz qvLZmvCmm2/fKz0uFAkfY0X+cA02BIhzWtTkMtj91aI4EqWf28lwQI96I9VxgZ/cyulm SE8e6E782tN2ADIcOMthhzOETxUPPLyGXOMCIfRnboLEO1sXr9RT94wnUJlcD2sZa4NI goyclkQgiG6vIX5foBfhcEhRg29UaoSbr5jY3Jjdj6NlG8Uigb2DDH1dvnzBk6+EXWar AkENJ8TH7Jx4t4i816iEp7Y3V3RJsAM59h0nVMGOjTq7vPH1RDT7rhruGwqVmqvkagRC bB8Q== X-Gm-Message-State: AElRT7H9Gl8C/n1CvbpVPvvKhmAmXCEnWryAxHV52IrNFS3wrvstZ93V uzA+j7hCFqqT4QJ+dVDYuRb6fG2o X-Google-Smtp-Source: AIpwx4/m9jj/yVzuljV+nIFgeaMQRgZrbKhhycpWKlRGYrRoYqvC1E3h373KYcfvmGPM9J0TYOjbaQ== X-Received: by 10.223.143.86 with SMTP id p80mr14571232wrb.31.1522853888100; Wed, 04 Apr 2018 07:58:08 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id q127sm10838124wmd.3.2018.04.04.07.58.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 07:58:07 -0700 (PDT) Date: Wed, 4 Apr 2018 16:57:54 +0200 From: Adrien Mazarguil To: dev@dpdk.org Cc: stable@dpdk.org, Roman Zhukov , Andrew Rybchenko Message-ID: <20180404144805.11966-6-adrien.mazarguil@6wind.com> References: <20180323124725.15806-1-adrien.mazarguil@6wind.com> <20180404144805.11966-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180404144805.11966-1-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH v2 05/13] net/sfc: fix endian conversions in flow API 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: , X-List-Received-Date: Wed, 04 Apr 2018 14:58:08 -0000 These conversions do not use the adequate function. Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters") Fixes: 894080975e1e ("net/sfc: support VLAN in flow API filters") Fixes: e2675132444e ("net/sfc: support TCP in flow API filters") Fixes: e01f84f42cad ("net/sfc: support UDP in flow API filters") Cc: stable@dpdk.org Cc: Roman Zhukov Cc: Andrew Rybchenko Signed-off-by: Adrien Mazarguil --- drivers/net/sfc/sfc_flow.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index fe4c0b0c5..9060fdc2f 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -7,6 +7,7 @@ * for Solarflare) and Solarflare Communications, Inc. */ +#include #include #include #include @@ -315,7 +316,7 @@ sfc_flow_parse_eth(const struct rte_flow_item *item, */ if (mask->type == supp_mask.type) { efx_spec->efs_match_flags |= EFX_FILTER_MATCH_ETHER_TYPE; - efx_spec->efs_ether_type = rte_bswap16(spec->type); + efx_spec->efs_ether_type = rte_be_to_cpu_16(spec->type); } else if (mask->type != 0) { goto fail_bad_mask; } @@ -370,7 +371,7 @@ sfc_flow_parse_vlan(const struct rte_flow_item *item, * the outer tag and the next matches the inner tag. */ if (mask->tci == supp_mask.tci) { - vid = rte_bswap16(spec->tci); + vid = rte_be_to_cpu_16(spec->tci); if (!(efx_spec->efs_match_flags & EFX_FILTER_MATCH_OUTER_VID)) { @@ -654,14 +655,14 @@ sfc_flow_parse_tcp(const struct rte_flow_item *item, */ if (mask->hdr.src_port == supp_mask.hdr.src_port) { efx_spec->efs_match_flags |= EFX_FILTER_MATCH_REM_PORT; - efx_spec->efs_rem_port = rte_bswap16(spec->hdr.src_port); + efx_spec->efs_rem_port = rte_be_to_cpu_16(spec->hdr.src_port); } else if (mask->hdr.src_port != 0) { goto fail_bad_mask; } if (mask->hdr.dst_port == supp_mask.hdr.dst_port) { efx_spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_PORT; - efx_spec->efs_loc_port = rte_bswap16(spec->hdr.dst_port); + efx_spec->efs_loc_port = rte_be_to_cpu_16(spec->hdr.dst_port); } else if (mask->hdr.dst_port != 0) { goto fail_bad_mask; } @@ -735,14 +736,14 @@ sfc_flow_parse_udp(const struct rte_flow_item *item, */ if (mask->hdr.src_port == supp_mask.hdr.src_port) { efx_spec->efs_match_flags |= EFX_FILTER_MATCH_REM_PORT; - efx_spec->efs_rem_port = rte_bswap16(spec->hdr.src_port); + efx_spec->efs_rem_port = rte_be_to_cpu_16(spec->hdr.src_port); } else if (mask->hdr.src_port != 0) { goto fail_bad_mask; } if (mask->hdr.dst_port == supp_mask.hdr.dst_port) { efx_spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_PORT; - efx_spec->efs_loc_port = rte_bswap16(spec->hdr.dst_port); + efx_spec->efs_loc_port = rte_be_to_cpu_16(spec->hdr.dst_port); } else if (mask->hdr.dst_port != 0) { goto fail_bad_mask; } -- 2.11.0