netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: hadi@cyberus.ca
Cc: kaber@trash.net, tgraf@suug.ch, netdev@oss.sgi.com
Subject: Re: [PATCH] PKT_SCHED: dsmark must take care of shared/cloned skbs
Date: Mon, 20 Dec 2004 17:02:22 -0800	[thread overview]
Message-ID: <20041220170222.5ee14588.davem@davemloft.net> (raw)
In-Reply-To: <1103552026.1048.324.camel@jzny.localdomain>

On 20 Dec 2004 09:13:46 -0500
jamal <hadi@cyberus.ca> wrote:

> Certainly not a big deal; shouldnt care if once in a while tcpdump
> actually gets to see the real packet that went out the wire.

It's not just tcpdump.  Any modification of a the packet data
for a shared SKB is illegal, no matter where it occurs.
This can corrupt TCP packets, which share the transmitted
packet with the socket retransmit queue.

We have a similar problem with TSO and some gigabit cards whose
drivers muck with the iphdr->tot_len field on transmit.  I still
am not sure how I want to address that case yet.  Since transmitted
TCP data packets are always shared/cloned, we'll have to do a data
copy on every TSO send on these cards which frankly nullifies much
of the performance gain TSO gives.  If we end of fixing it via a copy
we'll probably need to seriously consider not doing TSO unless we
are doing sendfile.

  reply	other threads:[~2004-12-21  1:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-18 17:00 [PATCH] PKT_SCHED: dsmark must take care of shared/cloned skbs Thomas Graf
2004-12-18 21:00 ` Thomas Graf
2004-12-19 20:23 ` jamal
2004-12-19 20:36   ` Thomas Graf
2004-12-19 22:53     ` jamal
2004-12-19 23:18       ` Thomas Graf
2004-12-20  8:06     ` Patrick McHardy
2004-12-20 14:13       ` jamal
2004-12-21  1:02         ` David S. Miller [this message]
2004-12-22 13:14           ` jamal
2004-12-22 13:50             ` Thomas Graf

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=20041220170222.5ee14588.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=kaber@trash.net \
    --cc=netdev@oss.sgi.com \
    --cc=tgraf@suug.ch \
    /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).