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=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 1CB7EC433E0 for ; Wed, 5 Aug 2020 18:36:44 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3CD322CF7 for ; Wed, 5 Aug 2020 18:36:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mrPr6ClH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3CD322CF7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1k3OGw-0004yG-Vu; Wed, 05 Aug 2020 14:36:18 -0400 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1k3OGo-0004qv-QV for kernelnewbies@kernelnewbies.org; Wed, 05 Aug 2020 14:36:11 -0400 Received: by mail-io1-xd35.google.com with SMTP id v6so31690065iow.11 for ; Wed, 05 Aug 2020 11:36:07 -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; bh=sfilBRShTxlImSB85ZUCiqVScdLkWXnVLbvG9JuCKV0=; b=mrPr6ClHheKwmNwBHFroEkqoaSPY4qRTKEb/UiFfjgNDRGAnIAQzumnBkwQn84h0+V WhPlVK0ZfgIx90qF7QHczzJhnxFBYCK6H/Lqob9RsArfdaZRSqjXxGQRJ0x24tsEZGvn KRlWzgjfxvo0DHVKOxm54Jxh8XLOhQ/+v7YrPww0oRFo6leGulkn79P+zhspOoV4zS94 B1AUfDU5F7apFTfaNYafGOLbo1V4H6+u94kQ0jgSUaamLjPjhYa8+SFnxqw5Kdidj6qU nm250bMx0/innUFTy2xlgDZMjhJA1YvBlzReXofF1S4YOrNCfbHLQ4bAiHUBACEjeOs5 05ew== 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=sfilBRShTxlImSB85ZUCiqVScdLkWXnVLbvG9JuCKV0=; b=c1kqTDya+/ZXecsOWyoqr1cLy3oJOX+b3H+TSnUA48zdAvFClal5LXc2HzoqOvCcqU C7g3jI1TZg2fhxKFez/rDhinTPa9BZfkRMUXbFMWUfw2VXGBgIpB+bx65XpnGLHbUTby ZveredIfnPL5GnH+QQyUItC/pd2DNCTgf4vJFFDLat3d1j8AdeR0Ze13PDwsuGsSiBRG WYw1h1QErCmzoLUNeexq3Qv+Vx8SvCckRWmwApVFgaB9+f2FqLZKe4crf30yVL26efYm 8KR72jzE0VgEYlHmPV+I4iRufC+i73GKAOB48t5lpfnWBDJiCn577gdvnUXxU8W4yloa PgsA== X-Gm-Message-State: AOAM533TEYY09eb3w0LATpzBRcc2loMhMEdISOzNyvu4S5n35CxDMu2a YmQGaVDWCOI7R8ByOxOckB338dX1cN6wLrzrG7tsyth3 X-Google-Smtp-Source: ABdhPJxNnPJPZlWc2SVBUBK7/BJIhQCJ8TKhKimjP91+7KAlmmngxfE/mUo4et1ngB2U4OtCqQLGgZIEtWRysID3YGg= X-Received: by 2002:a5e:dd4c:: with SMTP id u12mr4461506iop.93.1596652503488; Wed, 05 Aug 2020 11:35:03 -0700 (PDT) MIME-Version: 1.0 From: Vasu M Date: Wed, 5 Aug 2020 11:34:52 -0700 Message-ID: Subject: Relationship between Rx/Tx ring and Skbuff. To: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1803787500663546859==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============1803787500663546859== Content-Type: multipart/alternative; boundary="0000000000004cdc1605ac25a1d9" --0000000000004cdc1605ac25a1d9 Content-Type: text/plain; charset="UTF-8" Hi, I would like to understand the journey of the packet in Linux kernel. There are many resources that explain this differently but as I have understood it on a high level, when a packet is received in a NIC, DMA moves the packets from the NIC frame buffer into the RX ring buffer in the driver. A hardware interrupt is then raised and the top half moves the packet to the RX ring buffer. Is it right to understand that the bottom half tasklets then drain the buffer and move the packets to sk_buff data structure? Are the RX/TX buffers different from sk_buff in terms of memory regions or the sk_buff simply points to the physical address of the packets residing in the RX ring and then does the manipulation of the pointers to send it up in the kernel IP stack? I know this is a broad topic but I would like to seek clarification from the experts on my understanding of packet movement inside the kernel. Or can you point me to a resource which can be a close explanation about the implementation on how the kernel handles in > 4.x ? Thanks, Vasu --0000000000004cdc1605ac25a1d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,=C2=A0

I would like to understand th= e journey of the packet in Linux kernel. There are many resources that expl= ain=C2=A0this differently but as I have understood it on a high level, when= a packet is received in a NIC, DMA=C2=A0 moves the packets from the NIC fr= ame=C2=A0buffer into the RX ring buffer in the driver. A hardware interrupt= is then raised and the top half moves the=C2=A0packet to the RX ring buffe= r. Is it right=C2=A0to understand that the bottom half tasklets then drain = the buffer and move the packets to sk_buff data structure? Are the RX/TX bu= ffers different from sk_buff in terms of memory regions or the sk_buff simp= ly points to the physical address of the packets residing in the RX ring an= d then does the=C2=A0manipulation of the pointers to send it up in=C2=A0the= kernel IP stack?=C2=A0

I know this is a broad top= ic but I would like to seek clarification from the experts on my understand= ing of packet movement inside the kernel.=C2=A0 Or can you point me to a re= source which can be a close explanation about the implementation on how the= kernel handles in > 4.x ?

Thanks,
Vasu
--0000000000004cdc1605ac25a1d9-- --===============1803787500663546859== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============1803787500663546859==--