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=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 758DBC433EF for ; Thu, 23 Sep 2021 16:06:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D92C606A5 for ; Thu, 23 Sep 2021 16:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242395AbhIWQIN (ORCPT ); Thu, 23 Sep 2021 12:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242448AbhIWQIK (ORCPT ); Thu, 23 Sep 2021 12:08:10 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40497C061574 for ; Thu, 23 Sep 2021 09:06:39 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id a13so6632330qtw.10 for ; Thu, 23 Sep 2021 09:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=S037++Fg3/u2sSJM6o8yWeOZfwgBir+bmyu6tYQlVm4=; b=yuLeLeEKgtHGy/AlVVlFpjvpCx8MgikO0bZFcPmuNcUBe1LnIRbyAsWDDBTuoQw+XA +YgfQ5gWMSb/3uLV9RCDd0yqkBGWWPwL7STrqp5fmAl1nVPQPI6RsPH88I3Q6zXddH+n PcTLm59234CJngvnIU2r2KzyS0na/kisYG5yjV1CZslb9M0eUZOuqW+kgU3Te/us+f6m 853iI6l0pg9EqcI2CDczUL80xHrZIXtu4QsvOiIrbCnRKv6DGUv2XaXc3v4FKqn+Flu0 oyBeWyqrTV6FUb4/Iy2lvCeNfa3etIpxHk0BUebgnxbDJ9LYKgx4aNiFMsZzKXqzv13v E+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S037++Fg3/u2sSJM6o8yWeOZfwgBir+bmyu6tYQlVm4=; b=VqFWZkc3OqyChSVlepnarSYUpHDNVMgs6SUEkEzs0CKMMt+M9qK8GAHmlGKgXnayPM 3Od/Nwmvmdwbg5V+AA1jh8nkMc3GHhDlBs7rgRpjjE7863jEYIdU6g7QJfdSXdtbfx7Y D1Lcyr23wSpU0m+Non5zUXs5cajKJrqGEE3aEt0E18GL3SwdzLNc/l1J3WlpIFa+AQgK TswmW5tZ39QkvwAdDaBSLdX6WrKjl2w7LhfK++Us4+3eokupStmCtKPXcfFOugXHScd9 gY+/5Bg+7Dk0/wGYsz3Q9cP6zxCO7Q/YxAXs+4H7LFPKren6Xf8de636auMgBLpghxYJ 5CUg== X-Gm-Message-State: AOAM531sF/m9fjVYv8D8WlAuD8Ife98HWoNjRgh5xv5OOFLgwdxVzy39 R0GJ2bbnKIQIVqJQYe9IwcMtYQ== X-Google-Smtp-Source: ABdhPJzXxLH30Pay40JM4NAvtwjZSMbhSgpSqdS1SoLaTEcgjWqGSkAICwqjmWFnOTn9PnYoFoJjKQ== X-Received: by 2002:ac8:149:: with SMTP id f9mr5391718qtg.208.1632413198360; Thu, 23 Sep 2021 09:06:38 -0700 (PDT) Received: from [192.168.1.173] (bras-base-kntaon1617w-grc-33-142-112-185-132.dsl.bell.ca. [142.112.185.132]) by smtp.googlemail.com with ESMTPSA id c25sm3038942qtm.78.2021.09.23.09.06.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Sep 2021 09:06:37 -0700 (PDT) Subject: Re: [PATCH net 2/2] net: sched: also drop dst for the packets toward ingress in act_mirred To: Cong Wang , Xin Long Cc: network dev , David Miller , Jakub Kicinski , Marcelo Ricardo Leitner , Davide Caratti , Hangbin Liu , Jiri Pirko , Shmulik Ladkani References: From: Jamal Hadi Salim Message-ID: <40b4a814-2687-b299-4253-ac506710e133@mojatatu.com> Date: Thu, 23 Sep 2021 12:06:36 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org +CC Shmulik. Unfortunately we dont have good test cases in tdc to test different scenarios of this setup (packets being redirected in both directions once or several times). cheers, jamal On 2021-09-21 11:52 p.m., Cong Wang wrote: > On Tue, Sep 21, 2021 at 12:02 AM Xin Long wrote: >> >> On Tue, Sep 21, 2021 at 2:34 AM Cong Wang wrote: >>> >>> On Mon, Sep 20, 2021 at 7:12 AM Xin Long wrote: >>>> >>>> Without dropping dst, the packets sent from local mirred/redirected >>>> to ingress will may still use the old dst. ip_rcv() will drop it as >>>> the old dst is for output and its .input is dst_discard. >>>> >>>> This patch is to fix by also dropping dst for those packets that are >>>> mirred or redirected to ingress in act_mirred. >>> >>> Similar question: what about redirecting from ingress to egress? >> We can do it IF there's any user case needing it. >> But for now, The problem I've met occurred in ip_rcv() for the user case. > > I think input route is different from output route, so essentially we need > a reset when changing the direction, but I don't see any bugs so far, > except this one. > > Thanks. >