From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 8D8FA3B2A4 for ; Wed, 1 Aug 2018 12:22:54 -0400 (EDT) Received: by mail-qt0-x233.google.com with SMTP id e19-v6so20513861qtp.8 for ; Wed, 01 Aug 2018 09:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=KiUN+3poO4Y7Ae6OGUM8zh5tiQIjwyKYJbgahM4GErQ=; b=Q4DM8JmxKl5mkmHZlrslyRmCLiO3iNjZmKE0+5PV4eEleYu+fxCrEXm6sCfYALjx59 xYoPjFDbyGnG4VwHaFY2Ge5CfeQve2Fud6U8L2YNxhWX7bkx1fiRIqdHebKoXR0GVsYz fgwDIx3mQ7tQT9/3sLQGRTKT9LvxZRNcxleJ5jZftphi32gHlLSv2RSRH54/H8d8aA6/ ijFkcYMJL3JpsIclZZ4CHkHn6gMAZtxbngiTPauBPy+XGLUKJR+4/F2QoaBBmFu0zJ8U EnEGujSgVEeytFjOycmg4bsGIlxXwAEz46C+vJuNcMiaPUoDNV9vG4RnNrLCLFa+tirO H7oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=KiUN+3poO4Y7Ae6OGUM8zh5tiQIjwyKYJbgahM4GErQ=; b=r52lWAJgHTPbugdP2wRSMhXQzn3GJpMe5400Qw0C1BAqlIz2tmptIwoVwgAsohvgSM xFjNjLPpV999gBGS1fYgPjTnC/zDV7b/LY9raSmAatoxfAw+9a7gbAZ8izRFN/DtutJa bt7pWe1cuN6WDkNyw8IFHs7GEZRT/YL6GjP7AeRaZ4lcj9vIi4iMkyA46f+i+G+FJxqC n0+knmYXvPkjEcPKonSCj2bcQWm/bOVend0KIbNlZWQ/FN49xXp6R93UXXc8dQy05KbK IwjbKL1jx1fhtYGJ9GXBEM9+ACrXUIevNkBugwrK/TFNjDOfbI3kYUvMGjy5Re9Zuc47 UiAg== X-Gm-Message-State: AOUpUlEpViDh7f44V2B77XUMBR5CE+96QQwJuSd8Jh7SSl7ci0ZCl5lf 3Hi4mp7nexrKxQ5EKHOUKxojDiLo0hfOate7pDmEEg== X-Google-Smtp-Source: AAOMgpcUPQIOGuI2bLLAKdfAKouA46nznzrljINm4kHz2ebbqw0/t3cejQekaPMG+nV6OWXSPRZaeVI/M5ERM5mnS6A= X-Received: by 2002:a0c:bfd8:: with SMTP id u24-v6mr24063066qvj.158.1533140573737; Wed, 01 Aug 2018 09:22:53 -0700 (PDT) MIME-Version: 1.0 From: Dave Taht Date: Wed, 1 Aug 2018 09:22:41 -0700 Message-ID: To: Cake List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [Cake] passing args to bpf programs X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 16:22:54 -0000 this really isn't the right list for this... but I wanted to build on the ack_filter bpf code I had, to create impairments, like dropping acks every X packets, or randomly, or when a specific pattern is seen (like timestamps or sack). This was sort of the reverse complement to getting the cake ack-filter right, now that I know everything that can go wrong... I see I can return ACT_SHOT, so I can drop packets. But what I can't quite figure out is how to pass args to an tc ebpf program. Do I have to pass those via a file descriptor? A map generated elsewhere? what? Sure as heck don't want to compile one program per opt.... Simplest args would be: max 16 - drop every 16th ack packet random 24 - drop randomly between 0 24 match only certain flags followed by more gnarly ones like: miscalculate if I have a payload or not drop sack mangle timestamps --=20 Dave T=C3=A4ht CEO, TekLibre, LLC http://www.teklibre.com Tel: 1-669-226-2619