netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros
@ 2020-12-29  9:08 Baruch Siach
  2020-12-29  9:08 ` [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference Baruch Siach
  2021-01-04 21:30 ` [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Baruch Siach @ 2020-12-29  9:08 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Jonathan Corbet
  Cc: netdev, linux-doc, Ulisses Alonso Camaró,
	Willem de Bruijn, Baruch Siach

The citation of macro definitions should appear in a code block.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 Documentation/networking/packet_mmap.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/networking/packet_mmap.rst b/Documentation/networking/packet_mmap.rst
index 6c009ceb1183..f3646c80b019 100644
--- a/Documentation/networking/packet_mmap.rst
+++ b/Documentation/networking/packet_mmap.rst
@@ -437,7 +437,7 @@ and the following flags apply:
 Capture process
 ^^^^^^^^^^^^^^^
 
-     from include/linux/if_packet.h
+From include/linux/if_packet.h::
 
      #define TP_STATUS_COPY          (1 << 1)
      #define TP_STATUS_LOSING        (1 << 2)
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference
  2020-12-29  9:08 [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros Baruch Siach
@ 2020-12-29  9:08 ` Baruch Siach
       [not found]   ` <CAPfuSqFOHDaxuUDwD6m3NVfzk+VTLKwvseOPrVYdchZAYF+sYQ@mail.gmail.com>
  2021-01-04 21:30 ` [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2020-12-29  9:08 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Jonathan Corbet
  Cc: netdev, linux-doc, Ulisses Alonso Camaró,
	Willem de Bruijn, Baruch Siach

Before commit 889b8f964f2f ("packet: Kill CONFIG_PACKET_MMAP.") there
used to be a CONFIG_PACKET_MMAP config symbol that depended on
CONFIG_PACKET. The text still implies that PACKET_MMAP can be disabled.
Remove that from the text, as well as reference to old kernel versions.

Also, drop reference to broken link to information for pre 2.6.5
kernels.

Make a slight working improvement (s/In/On/) while at it.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: Address comments from Jakub Kicinski and Willem de Bruijn

  * Don't change PACKET_MMAP

  * Remove mention of specific kernel versions

  * Don't reflow paragraphs

  * s/In/On/
---
 Documentation/networking/packet_mmap.rst | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/networking/packet_mmap.rst b/Documentation/networking/packet_mmap.rst
index f3646c80b019..500ef60b1b82 100644
--- a/Documentation/networking/packet_mmap.rst
+++ b/Documentation/networking/packet_mmap.rst
@@ -8,7 +8,7 @@ Abstract
 ========
 
 This file documents the mmap() facility available with the PACKET
-socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for
+socket interface. This type of sockets is used for
 
 i) capture network traffic with utilities like tcpdump,
 ii) transmit network traffic, or any other that needs raw
@@ -25,12 +25,12 @@ Please send your comments to
 Why use PACKET_MMAP
 ===================
 
-In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process is very
+Non PACKET_MMAP capture process (plain AF_PACKET) is very
 inefficient. It uses very limited buffers and requires one system call to
 capture each packet, it requires two if you want to get packet's timestamp
 (like libpcap always does).
 
-In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size
+On the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size
 configurable circular buffer mapped in user space that can be used to either
 send or receive packets. This way reading packets just needs to wait for them,
 most of the time there is no need to issue a single system call. Concerning
@@ -252,8 +252,7 @@ PACKET_MMAP setting constraints
 
 In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6 branch),
 the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit architecture or
-16384 in a 64 bit architecture. For information on these kernel versions
-see http://pusa.uv.es/~ulisses/packet_mmap/packet_mmap.pre-2.4.26_2.6.5.txt
+16384 in a 64 bit architecture.
 
 Block size limit
 ----------------
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference
       [not found]   ` <CAPfuSqFOHDaxuUDwD6m3NVfzk+VTLKwvseOPrVYdchZAYF+sYQ@mail.gmail.com>
@ 2020-12-30 13:30     ` Baruch Siach
  0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2020-12-30 13:30 UTC (permalink / raw)
  To: Ulises Alonso
  Cc: David S. Miller, Jakub Kicinski, Jonathan Corbet, netdev,
	linux-doc, Ulisses Alonso Camaró,
	Willem de Bruijn

Hi Ulises,

On Tue, Dec 29 2020, Ulises Alonso wrote:
> Can you also replace the sentence
>
>      "(like libpcap always does)."
>
> with
>
>     "(which old libpcap versions used do)."

Are you sure this change is correct? The text says:

  ... it requires two if you want to get packet's timestamp
  (like libpcap always does).

I think libpcap still reads packets timestamps, though it most likely
uses the newer interface for that.

Maybe we should just drop the libpcap reference here?

Thanks for reviewing the patch,
baruch

> On Tue, Dec 29, 2020 at 10:11 AM Baruch Siach <baruch@tkos.co.il> wrote:
>
>> Before commit 889b8f964f2f ("packet: Kill CONFIG_PACKET_MMAP.") there
>> used to be a CONFIG_PACKET_MMAP config symbol that depended on
>> CONFIG_PACKET. The text still implies that PACKET_MMAP can be disabled.
>> Remove that from the text, as well as reference to old kernel versions.
>>
>> Also, drop reference to broken link to information for pre 2.6.5
>> kernels.
>>
>> Make a slight working improvement (s/In/On/) while at it.
>>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>> ---
>> v2: Address comments from Jakub Kicinski and Willem de Bruijn
>>
>>   * Don't change PACKET_MMAP
>>
>>   * Remove mention of specific kernel versions
>>
>>   * Don't reflow paragraphs
>>
>>   * s/In/On/
>> ---
>>  Documentation/networking/packet_mmap.rst | 9 ++++-----
>>  1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/Documentation/networking/packet_mmap.rst
>> b/Documentation/networking/packet_mmap.rst
>> index f3646c80b019..500ef60b1b82 100644
>> --- a/Documentation/networking/packet_mmap.rst
>> +++ b/Documentation/networking/packet_mmap.rst
>> @@ -8,7 +8,7 @@ Abstract
>>  ========
>>
>>  This file documents the mmap() facility available with the PACKET
>> -socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for
>> +socket interface. This type of sockets is used for
>>
>>  i) capture network traffic with utilities like tcpdump,
>>  ii) transmit network traffic, or any other that needs raw
>> @@ -25,12 +25,12 @@ Please send your comments to
>>  Why use PACKET_MMAP
>>  ===================
>>
>> -In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process
>> is very
>> +Non PACKET_MMAP capture process (plain AF_PACKET) is very
>>  inefficient. It uses very limited buffers and requires one system call to
>>  capture each packet, it requires two if you want to get packet's timestamp
>>  (like libpcap always does).
>>
>> -In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a
>> size
>> +On the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a
>> size
>>  configurable circular buffer mapped in user space that can be used to
>> either
>>  send or receive packets. This way reading packets just needs to wait for
>> them,
>>  most of the time there is no need to issue a single system call.
>> Concerning
>> @@ -252,8 +252,7 @@ PACKET_MMAP setting constraints
>>
>>  In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6
>> branch),
>>  the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit
>> architecture or
>> -16384 in a 64 bit architecture. For information on these kernel versions
>> -see
>> http://pusa.uv.es/~ulisses/packet_mmap/packet_mmap.pre-2.4.26_2.6.5.txt
>> +16384 in a 64 bit architecture.
>>
>>  Block size limit
>>  ----------------
>> --
>> 2.29.2

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros
  2020-12-29  9:08 [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros Baruch Siach
  2020-12-29  9:08 ` [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference Baruch Siach
@ 2021-01-04 21:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-04 21:30 UTC (permalink / raw)
  To: Baruch Siach
  Cc: davem, kuba, corbet, netdev, linux-doc, uaca, willemdebruijn.kernel

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue, 29 Dec 2020 11:08:38 +0200 you wrote:
> The citation of macro definitions should appear in a code block.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  Documentation/networking/packet_mmap.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [v2,1/2] docs: networking: packet_mmap: fix formatting for C macros
    https://git.kernel.org/netdev/net/c/17e94567c57d
  - [v2,2/2] docs: networking: packet_mmap: fix old config reference
    https://git.kernel.org/netdev/net/c/e4da63cda51f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-04 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29  9:08 [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros Baruch Siach
2020-12-29  9:08 ` [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference Baruch Siach
     [not found]   ` <CAPfuSqFOHDaxuUDwD6m3NVfzk+VTLKwvseOPrVYdchZAYF+sYQ@mail.gmail.com>
2020-12-30 13:30     ` Baruch Siach
2021-01-04 21:30 ` [PATCH v2 1/2] docs: networking: packet_mmap: fix formatting for C macros patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).