From owner-soc-status@freebsd.org Wed Jun 10 17:37:13 2020 Return-Path: Delivered-To: soc-status@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A39633A9E4 for ; Wed, 10 Jun 2020 17:37:13 +0000 (UTC) (envelope-from ankur.kothiwal99@gmail.com) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49hvLw04wLz4JvT; Wed, 10 Jun 2020 17:37:11 +0000 (UTC) (envelope-from ankur.kothiwal99@gmail.com) Received: by mail-qt1-f170.google.com with SMTP id k22so2419473qtm.6; Wed, 10 Jun 2020 10:37:11 -0700 (PDT) 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; bh=2MeoGUUDMThuaFK/htPw4C4YH5E5cW4j3LsjvTJHnEE=; b=i1g9RutmW/u/2ZEsYrF89gqtrOS4PhIf9eKlpOlLu8GhogFVnVVoHarPoyRpEjsrHq xc/oiDpFEK9Y0s+/Gw2TtLtLk6kT6ut4pHUywPWUHwq8oavYlf6gA4w2fvMgX0ccjqYP cZoWsbeCuoD3iF/TDusZrIyfwbTpX/A5myPzw7oZ4iNp4TCC+SBTQadHDihqs+CO/Sq4 PcP4NDiPV7plLwVswjlCF6R4K/XhnvVS1+jL/x3vsUWec76M6K+pCf7iAXCtI+khar8/ 9/OCF7606zR0aCQPaetZt38BTRJUdseeJOX/R7n8HLg0RJonxHHOa2P4+TULN0U4VReS ka6g== X-Gm-Message-State: AOAM53337TFjPHWHGgk5yD42YgCFfCrZz/irYglvrKtl4+tEsbkG0Pkt tM4FglOsihXqJLLKJUa6O+UUcBnClefYBw== X-Google-Smtp-Source: ABdhPJzbXneIhaINM6CFb2kk5l+1L00g/b/02mcQJbYb/AlOXteqWA8zJxNAqV/o+6QktAZbG/28zg== X-Received: by 2002:aed:3b0d:: with SMTP id p13mr4608083qte.263.1591810630733; Wed, 10 Jun 2020 10:37:10 -0700 (PDT) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com. [209.85.222.175]) by smtp.gmail.com with ESMTPSA id d17sm268703qke.101.2020.06.10.10.37.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Jun 2020 10:37:10 -0700 (PDT) Received: by mail-qk1-f175.google.com with SMTP id 205so2876588qkg.3; Wed, 10 Jun 2020 10:37:09 -0700 (PDT) X-Received: by 2002:a37:2e86:: with SMTP id u128mr4246054qkh.26.1591810628942; Wed, 10 Jun 2020 10:37:08 -0700 (PDT) MIME-Version: 1.0 From: Ankur Kothiwal Date: Wed, 10 Jun 2020 23:06:40 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: [GSoC'20 Weekly Update - Week 1] eBPF XDP Hook To: soc-status@freebsd.org, rstone@freebsd.org, hrs@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49hvLw04wLz4JvT X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ankurkothiwal99@gmail.com designates 209.85.160.170 as permitted sender) smtp.mailfrom=ankurkothiwal99@gmail.com X-Spamd-Result: default: False [-2.27 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.170:from]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.94)[-0.939]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-0.92)[-0.922]; NEURAL_HAM_SHORT(-0.41)[-0.413]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.170:from]; FORGED_SENDER(0.30)[ankur@freebsd.org,ankurkothiwal99@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[ankur@freebsd.org,ankurkothiwal99@gmail.com] X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2020 17:37:13 -0000 Hi all, Project: Implement eBPF XDP for FreeBSD by extending VirtIO ethernet driver if_vtnet The goal of this project is to extend an existing FreeBSD network driver,VirtIO if_vtnet to be able to call into an eBPF program when processing a newly received packet. The driver will perform the basic actions of XDP like PASS and DROP the packet as specified by the program. The project will also implement new map type and other eBPF helper functions.The aim of this project is to add new probe sites into the kernel that will call eBPF functions. Mentor: Ryan Stone and Hiroki Sato The aim for the design implementation was to register a struct ebpf_probe when an interface is registered with pfil(9), and when a program is attached to the ebpf probe, we will add a hook to the pfil head for the interface to add a hook we used ebpf_activate_probe()). But currently it is very specific to syscall probes. So for the activating probe, we modified the ebpf_activate_probe to be of general use and moved the syscall related active probe to a new function ebpf_active_syscall_probe(). When initializing syscall probes, the activate pointer points to the ebpf_active_sycall_probe() function and when the XDP probe is registered, the function pointer can be set to a XDP related function. To register with pfil_add_hook, we used the ebpf_probe_fire() as a wrapper function to be used as general function and for syscall related callback we created a new function ebpf_syscall_probe_fire(). Project GSoC Wiki: https://wiki.freebsd.org/SummerOfCodeIdeas#eBPF_XDP_Hooks Github Repo for the code: https://github.com/rysto32/freebsd/tree/ebpf-import For above related commits refer: https://github.com/Ankurk99/freebsd/tree/ebpf-import Thank you for reading. Please feel free to share your feedback and suggestions. Thanks and Regards Ankur Kothiwal