From mboxrd@z Thu Jan 1 00:00:00 1970 From: xiaofeis@codeaurora.org Subject: Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca Date: Thu, 28 Mar 2019 12:37:43 +0800 Message-ID: <716c5abd087e888a8c7ac9baaa3c702d@codeaurora.org> References: <1553659146-44406-1-git-send-email-xiaofeis@codeaurora.org> <20190327101539.GA5348@vkoul-mobl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190327101539.GA5348@vkoul-mobl> Sender: netdev-owner@vger.kernel.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 List-Id: linux-arm-msm@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.