Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

11 messages, 3 authors, 2007-03-28 · open the first message on its own page

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: David Miller <davem@davemloft.net>
Date: 2007-03-27 21:07:50

From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+					const int from_offset,
+					const int to_offset,
+					const unsigned int len)
+{
+	memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Arnaldo Carvalho de Melo <hidden>
Date: 2007-03-27 21:22:17

On 3/27/07, David Miller [off-list ref] wrote:
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?
I don't want to intend anything with this, was just a brain fart, a
failed attempt to convince me that this was needed, I apologise for
letting this sleep thru, will remove and resubmit, ok?

- Arnaldo

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: David Miller <davem@davemloft.net>
Date: 2007-03-27 21:25:04

From: "Arnaldo Carvalho de Melo" <redacted>
Date: Tue, 27 Mar 2007 18:22:14 -0300
I don't want to intend anything with this, was just a brain fart, a
failed attempt to convince me that this was needed, I apologise for
letting this sleep thru, will remove and resubmit, ok?
Perfect.

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Patrick McHardy <hidden>
Date: 2007-03-27 21:25:19

Arnaldo Carvalho de Melo wrote:
On 3/27/07, David Miller [off-list ref] wrote:
quoted
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?

I don't want to intend anything with this, was just a brain fart, a
failed attempt to convince me that this was needed, I apologise for
letting this sleep thru, will remove and resubmit, ok?

nf_nat_helper.c:mangle_content() could make use of this, but it
would need memmove. Something to do this with non-linear packets
would be even cooler :)

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Arnaldo Carvalho de Melo <hidden>
Date: 2007-03-27 21:25:33

On 3/27/07, Arnaldo Carvalho de Melo [off-list ref] wrote:
On 3/27/07, David Miller [off-list ref] wrote:
quoted
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?
I don't want to intend anything with this, was just a brain fart, a
failed attempt to convince me that this was needed, I apologise for
letting this sleep thru, will remove and resubmit, ok?
Aaaaaaaaaaargh, s/sleep/slip/g

- Arnaldo "Using a fully due brown paper bag" Melo

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Arnaldo Carvalho de Melo <hidden>
Date: 2007-03-27 21:33:31

On 3/27/07, Patrick McHardy [off-list ref] wrote:
Arnaldo Carvalho de Melo wrote:
quoted
On 3/27/07, David Miller [off-list ref] wrote:
quoted
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?

I don't want to intend anything with this, was just a brain fart, a
failed attempt to convince me that this was needed, I apologise for
letting this sleep thru, will remove and resubmit, ok?

nf_nat_helper.c:mangle_content() could make use of this, but it
would need memmove. Something to do this with non-linear packets
would be even cooler :)
Damn, that was so fast man! For the qeth case that motivated me to try
the leftover it was like: memcpy is the fastest way, memmove would be
more costly but more general, when in doubt I just droppped the users
without removing the infrastructure, nah, lets leave this for another
day, for now I'll just drop the non-used -new infrastrucure and
resubmit.

- Arnaldo

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Patrick McHardy <hidden>
Date: 2007-03-27 21:36:20

Arnaldo Carvalho de Melo wrote:
On 3/27/07, Patrick McHardy [off-list ref] wrote:
quoted
nf_nat_helper.c:mangle_content() could make use of this, but it
would need memmove. Something to do this with non-linear packets
would be even cooler :)

Damn, that was so fast man! For the qeth case that motivated me to try
the leftover it was like: memcpy is the fastest way, memmove would be
more costly but more general, when in doubt I just droppped the users
without removing the infrastructure, nah, lets leave this for another
day, for now I'll just drop the non-used -new infrastrucure and
resubmit.

Yes, as long as it doesn't help with anything else it doesn't seem
too useful. It did motivate me to try the non-linear skb mangling
though :)

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Arnaldo Carvalho de Melo <hidden>
Date: 2007-03-27 21:56:12

On 3/27/07, David Miller [off-list ref] wrote:
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?
It should be ok now, please take a look in a throwaway branch to make
sure, sorry for the disturbance.

- Arnaldo

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: David Miller <davem@davemloft.net>
Date: 2007-03-27 22:31:10

From: "Arnaldo Carvalho de Melo" <redacted>
Date: Tue, 27 Mar 2007 18:56:11 -0300
On 3/27/07, David Miller [off-list ref] wrote:
quoted
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?
It should be ok now, please take a look in a throwaway branch to make
sure, sorry for the disturbance.
Where should I pull from?  Please always specify this, I delete
old emails from a thread when I expect a resubmit, so I don't
even know the original URL.  THanks.

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: Arnaldo Carvalho de Melo <hidden>
Date: 2007-03-27 23:07:52

On 3/27/07, David Miller [off-list ref] wrote:
From: "Arnaldo Carvalho de Melo" <redacted>
Date: Tue, 27 Mar 2007 18:56:11 -0300
quoted
On 3/27/07, David Miller [off-list ref] wrote:
quoted
From: Arnaldo Carvalho de Melo <redacted>
Date: Tue, 27 Mar 2007 16:41:48 -0300
quoted
+static inline void skb_move_linear_data(const struct sk_buff *skb,
+                                     const int from_offset,
+                                     const int to_offset,
+                                     const unsigned int len)
+{
+     memcpy(skb->data + to_offset, skb->data + from_offset, len);
+}
+
What do you intend to use this for?  There are no users in
your patch, and I'd be fearful of overlapping cases (which
ought to be common for anything using this) which therefore
would require use of memmove() instead of memcpy().

How about we just leave out interfaces until we have a use
case?
It should be ok now, please take a look in a throwaway branch to make
sure, sorry for the disturbance.
Okay, Hairaru is this way:

master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.22

:-)

- Arnaldo

Re: [PATCH 2/2] [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

From: David Miller <davem@davemloft.net>
Date: 2007-03-28 01:51:10

From: "Arnaldo Carvalho de Melo" <redacted>
Date: Tue, 27 Mar 2007 20:07:50 -0300
Okay, Hairaru is this way:

master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.22
Pulled, thanks a lot.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help