From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3B57C43381 for ; Thu, 28 Mar 2019 04:37:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 867C52070B for ; Thu, 28 Mar 2019 04:37:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="OK2EzKDC"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="kPbVWBOP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725852AbfC1Ehp (ORCPT ); Thu, 28 Mar 2019 00:37:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57310 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfC1Ehp (ORCPT ); Thu, 28 Mar 2019 00:37:45 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 763936063A; Thu, 28 Mar 2019 04:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1553747864; bh=NCkWvqzxBLtbc3QvyMPpAI0uYUPohnwyWT6FLIM8Xkg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OK2EzKDCg3yLX4xPOgVcxHXcdd11Hbec76j8jkeUhREVPeKSrOZ4B+/AGRYASFBqS MyCQJ3ynxhudb741sLZ7d59Nhih5aKupMRDdT8/TSZxasUtWYfResE2zihLcF/t718 AzIUL0Tcmxme+MMCYli9aCgIHh3KGWiu8qhbVKbk= Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 995C06063A; Thu, 28 Mar 2019 04:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1553747863; bh=NCkWvqzxBLtbc3QvyMPpAI0uYUPohnwyWT6FLIM8Xkg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kPbVWBOPXPd/iDqzJZGXKtO9xocHMFojDREqumcuhHKxYv1h1DezndyKajTkHSkc+ 6w1YSabfk+4/bq0kq74tmrWpKx1MvSV3mkt7vaE3vnUDJUe8P1+rZuInARUHFzocsf EuYV1/jaU0gjnIYYn7vQcp5vEFGdHECFA9zR9sEI= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 28 Mar 2019 12:37:43 +0800 From: xiaofeis@codeaurora.org To: Vinod Koul Cc: davem@davemloft.net, netdev@vger.kernel.org, andrew@lunn.ch, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, vivien.didelot@gmail.com, f.fainelli@gmail.com, niklas.cassel@linaro.org, xiazha@codeaurora.org Subject: Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca In-Reply-To: <20190327101539.GA5348@vkoul-mobl> References: <1553659146-44406-1-git-send-email-xiaofeis@codeaurora.org> <20190327101539.GA5348@vkoul-mobl> Message-ID: <716c5abd087e888a8c7ac9baaa3c702d@codeaurora.org> X-Sender: xiaofeis@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019-03-27 18:15, Vinod Koul wrote: > On 27-03-19, 11:59, xiaofeis wrote: >> Add flow_dissect for qca tagged packet to get the right hash. > > Ideally this patch should have been tagged as V2. Anyhow the change > looks fine so: > > Reviewed-by: Vinod Koul > >> Signed-off-by: Xiaofei Shen >> --- >> net/dsa/tag_qca.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c >> index e886a3c..f4b4de3 100644 >> --- a/net/dsa/tag_qca.c >> +++ b/net/dsa/tag_qca.c >> @@ -113,8 +113,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff >> *skb, struct net_device *dev, >> return skb; >> } >> >> +static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 >> *proto, >> + int *offset) >> +{ >> + *offset = QCA_HDR_LEN; >> + *proto = ((__be16 *)skb->data)[0]; >> + >> + return 0; >> +} >> + >> const struct dsa_device_ops qca_netdev_ops = { >> .xmit = qca_tag_xmit, >> .rcv = qca_tag_rcv, >> + .flow_dissect = qca_tag_flow_dissect, >> .overhead = QCA_HDR_LEN, >> }; >> -- >> 1.9.1 Thanks Vinod, will take care next time.