From patchwork Tue Feb 13 14:00:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128240 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4285950ljc; Tue, 13 Feb 2018 06:04:55 -0800 (PST) X-Google-Smtp-Source: AH8x226TPEYe6/2AOcnyr8sARUXcD3il7uj/IFVEhkWoLYqa7bEGVVo7M6nyizZ8lFBRUClG/dD2 X-Received: by 10.237.59.201 with SMTP id s9mr1972449qte.83.1518530695359; Tue, 13 Feb 2018 06:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518530695; cv=none; d=google.com; s=arc-20160816; b=bZq4oJpTCEJFXR1xQ5/aE0ld6/jk50zatTVqsFhnQTqg1aTuBH07ikQj00UkcPESnh AzNI8ynE34UuLv9mYA3TT5PLDUhq7MTbqnA3CaHwhLNumjQSIrybCQ81nQcaZ/vUiDA2 rbojqupC8XGc5FOx7aS0nP2A8SyxU2i5OyU2Drkb1l0STCZwvwU+3tq/8n35nT+vGORl nbrPCrSbG8EvV7Z9oMbhsyrEj7IXY48mHZZ5oXY31aGFVHckB939eZiu6MNdjPjQ3Uih ZWezE6WTZERYdUhRhAfyi3abfmLuEw/YOpJCnvQW9qmH0/4kYxsL/R54wR/8nyXbh/q1 fYtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=c+WeaMLEGED9JfSP/5JRgnZs3kQxwLaeYHXUsrwbjVo=; b=UasyzQ1T+83alnlbVlb1sb6X7NMYDsmqTvzUX/zh60jU2fdRPgaqWD/dwL3C6AhQVZ YM4165gwFUc50LZ/j6vbsuZq75mB2TS/kqPvhHqgAg5eZIF8xC0GAH4UzufMolc+X5Sn X8+zc7R+ybpnHGgo+Krc/ILPKwOKNVNcUFpwU4p069v+2jwjCpguKZvdTNQUOhkRdZRm ScAVY6jOwA1lWPOyzaG1lph/1LLInuVn1YwOANAz5pROFQJDeT+LkynGTpXV64XO8Fnn 3vYUBEF4TuIT1I3cKodMyMmJIWg0LUk8LYqsf5rNF6QCUzNso+St+NWXW8SK6HyfPpQx Q/Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id l2si2260837qkd.70.2018.02.13.06.04.51; Tue, 13 Feb 2018 06:04:55 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 9DFD36175E; Tue, 13 Feb 2018 14:04:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CE3906151E; Tue, 13 Feb 2018 14:00:43 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3941A608A2; Tue, 13 Feb 2018 14:00:26 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 6F1AE616DA for ; Tue, 13 Feb 2018 14:00:18 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 21AD81242030 for ; Tue, 13 Feb 2018 17:00:17 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id e6cAiLzgcE-0HV4cC8U; Tue, 13 Feb 2018 17:00:17 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6Ss5leStGE-0GFuNtPF; Tue, 13 Feb 2018 17:00:16 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 13 Feb 2018 17:00:09 +0300 Message-Id: <1518530410-18574-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518530410-18574-1-git-send-email-odpbot@yandex.ru> References: <1518530410-18574-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 472 Subject: [lng-odp] [PATCH v2 6/7] linux-gen: packet: fix IP multicast parse X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen IPv4 multicast address range is between 224.0.0.0 and 239.255.255.255. So, first four bits are always 0xe (1110). Signed-off-by: Petri Savolainen --- /** Email created from pull request 472 (psavol:master-parser-validation) ** https://github.com/Linaro/odp/pull/472 ** Patch: https://github.com/Linaro/odp/pull/472.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: 38d924655e8119f902e986011a477e1ad9094ab6 **/ platform/linux-generic/odp_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index b2a22903c..05b8c4854 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2028,7 +2028,7 @@ static inline uint8_t parse_ipv4(packet_parser_t *prs, const uint8_t **parseptr, if (odp_unlikely(dstaddr == 0xffffffff)) prs->input_flags.ip_bcast = 1; - if (odp_unlikely((dstaddr >> 28) == 0xd)) + if (odp_unlikely((dstaddr >> 28) == 0xe)) prs->input_flags.ip_mcast = 1; return ipv4->proto;