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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 58768C43381 for ; Fri, 22 Mar 2019 20:05:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 152BD218D3 for ; Fri, 22 Mar 2019 20:05:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q+UavcqN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726603AbfCVUFk (ORCPT ); Fri, 22 Mar 2019 16:05:40 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43481 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbfCVUFk (ORCPT ); Fri, 22 Mar 2019 16:05:40 -0400 Received: by mail-pf1-f196.google.com with SMTP id c8so2230319pfd.10 for ; Fri, 22 Mar 2019 13:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iJg1blqQ0B3/bm5ebelyUEHItF7rJdo0VtE7WOX8GAE=; b=q+UavcqN0tKH0SyO6JZoRQcuG3p72wtC7V7Vvf1kups3+BPMflAicqjFeI3AQ9rMmD 0N8LadSqk5MBxcRwt8yoHAR7JW6Tfpsdw12SkQkxuAzhQ3CuWZZT3GE8hYUsvZP/3/H7 B1jS/33vYPG6rG3ej2HqvDKqCE0032WpGIKUcG5vO1EHvCTYa/HfbQNYWzl499HMRLrf n/wrbPB4kvKzMPmDSn9BThUN7lXodaJfKitec2lGqs76OxDEZ2ZWZsKultrSOTpAnfW2 LamfdVW+4upefv17cDJDulm/KsSWOguW0IW7aK66tmUdSRXSWF2R7xEXVAskHfEb3SJz L3sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=iJg1blqQ0B3/bm5ebelyUEHItF7rJdo0VtE7WOX8GAE=; b=DtegVFOGwzEMmwyWQQlkMHmSPRjxiRAvIpt+zStS0pn36Q14f2QsNPtYMZGAaSwPwW u6KV36Ex49SoUL24lqTMzf+cZ1K+n4bMb4yHy81hrS32INn80FhSj6M2cSF3Ij17LR+4 6thjgpSS9aCAC5Hf7IB+klr66/km752uO7LPmlDHbRn0TyZQep0RJILgxWxMspsCPXex l9lDGO8sm6WayrIcv8CjtgdgDsOxqez7Xv2zGSmZ6DN3Sedk6z6LFVKD8rQCNDSsqawb tf0akQEJVmM3wcXVcC1Cg0NpIFjtds99xa4xkmLR35ZkYTeMbjELRkOS/6X2YxtU5deh rXSA== X-Gm-Message-State: APjAAAWrcPugvMOe4hekfpKYQvJE4iFFtHGBhe6U+sdEqg3F1q4mz3T7 Vipo8D4CbVoGxVXe0PsXAe/gLchMlNlGb1p9UOe+lA== X-Google-Smtp-Source: APXvYqx64IJLSfpkMo3DsNz6dUSCK1mrObfSSxGiNsHYL223WWcuI8gk5c0t73s/kfKGICn2nmwf9tj1IoCVyqmMRIU= X-Received: by 2002:a62:a515:: with SMTP id v21mr3420117pfm.41.1553285139779; Fri, 22 Mar 2019 13:05:39 -0700 (PDT) MIME-Version: 1.0 References: <20190319194929.10798-1-ldir@darbyshire-bryant.me.uk> <20190322140905.64577-1-ldir@darbyshire-bryant.me.uk> <83E89315-6F11-48E5-812B-387E1CF07F54@darbyshire-bryant.me.uk> In-Reply-To: <83E89315-6F11-48E5-812B-387E1CF07F54@darbyshire-bryant.me.uk> From: Cong Wang Date: Fri, 22 Mar 2019 13:05:27 -0700 Message-ID: Subject: Re: [RFC PATCH 1/1 v2] net: sched: Introduce conndscp action To: "Kevin 'ldir' Darbyshire-Bryant" Cc: "jhs@mojatatu.com" , "jiri@resnulli.us" , "netdev@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Mar 22, 2019 at 11:26 AM Kevin 'ldir' Darbyshire-Bryant wrote: > > Hi Cong, > > Thanks for your questions. > > > On 22 Mar 2019, at 17:39, Cong Wang wrote: > > > > Hello, > > > > On Fri, Mar 22, 2019 at 7:09 AM Kevin 'ldir' Darbyshire-Bryant > > wrote: > >> > >> Conndscp is a new tc filter action module. It is designed to copy DSC= Ps > >> to conntrack marks and the reverse operation of conntrack mark contain= ed > >> DSCPs to the diffserv field of suitable skbs. > >> > > > > Is it possible and feasible to integrate this into connmark? > > I started off coding it that way but quickly ran into my limitations with= netlink messaging and became frustrated. Aside from my own limitations, c= onndscp ab/uses tcf_qstats requeues & overlimits to indicate DSCP->MARK->DS= CP operations and has been useful in proving DSCP/marking operations are oc= curring in the right times/places. Integrating with connmark which itself = uses overlimits to indicate conntrack mark to skb->mark restoration would l= ose that differentiation/confirmation/debug ability. A possibility is to a= b/use the drop count instead but I fear that would cause confusion. This sounds problematic, why a flag/parameter doesn't work? > > > Both are intended to retrieve information from conntrack and store > > it into skb. I know the name "connmark" already says it is a mark, > > while yours isn't, I still want to see if we can avoid code duplication= s. > > I understand your quest :-) I think conndscp does a bit more than connma= rk. Conndscp is two way diffserv<-->conntrack mark operation. connmark is= a single way conntrack mark->skb.mark operation. I am not sure if it is a good idea to modify conntrack in TC, as conntrack doesn't even belong to TC. Retrieving information from conntrack and saving it to skb is fine, as we modify skb in many different ways. Thanks.