From: David Miller <davem@davemloft.net>
To: Paul.Chavent@onera.fr
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3] packet: tx_ring: allow the user to choose tx data offset
Date: Wed, 07 Nov 2012 18:55:13 -0500 (EST) [thread overview]
Message-ID: <20121107.185513.577120386806348661.davem@davemloft.net> (raw)
In-Reply-To: <1352279447-2980-1-git-send-email-paul.chavent@onera.fr>
From: Paul Chavent <Paul.Chavent@onera.fr>
Date: Wed, 7 Nov 2012 10:10:47 +0100
> The tx data offset of packet mmap tx ring used to be :
> (TPACKET2_HDRLEN - sizeof(struct sockaddr_ll))
>
> The problem is that, with SOCK_RAW socket, the payload (14 bytes after
> the beginning of the user data) is misaligned.
>
> This patch allows to let the user gives an offset for it's tx data if
> he desires.
>
> Set sock option PACKET_TX_HAS_OFF to 1, then specify in each frame of
> your tx ring tp_net for SOCK_DGRAM, or tp_mac for SOCK_RAW.
>
> Signed-off-by: Paul Chavent <paul.chavent@onera.fr>
Applied, thanks.
prev parent reply other threads:[~2012-11-07 23:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 9:10 [PATCH net-next v3] packet: tx_ring: allow the user to choose tx data offset Paul Chavent
2012-11-07 23:55 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121107.185513.577120386806348661.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Paul.Chavent@onera.fr \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).