Skip to contentSkip to conversation

: Introduce skb_copy_from_linear_data{_offset}

PATCH David Miller 3 participants 11 messages Mar 27, 2007 – Mar 28, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

David Miller

author maintainer
#1 lore raw

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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?

#2 lore raw
Quoted 17 lines · David Miller

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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().

Quoted 2 lines

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

author maintainer
#3 lore raw

From: "Arnaldo Carvalho de Melo" <[email protected]>
Date: Tue, 27 Mar 2007 18:22:14 -0300

Quoted 3 lines

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.

#4 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 19 lines · Arnaldo Carvalho de Melo
Quoted 17 lines · David Miller

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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().

Quoted 7 lines
Quoted 2 lines

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 :)

#5 lore raw
Quoted 24 lines · Patrick McHardy
Quoted 23 lines · Arnaldo Carvalho de Melo
Quoted 19 lines · David Miller

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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?

Quoted 8 lines
Quoted 3 lines

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

#6 lore raw
Quoted 7 lines · Arnaldo Carvalho de Melo
Quoted 3 lines · Patrick McHardy

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 :)

Quoted 6 lines

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 :)

#7 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 18 lines · Arnaldo Carvalho de Melo
Quoted 17 lines · David Miller

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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().

Quoted 6 lines
Quoted 2 lines

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

#8 lore raw
In reply to David Miller
Quoted 17 lines · David Miller

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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().

Quoted 2 lines

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

author maintainer
#9 lore raw

From: "Arnaldo Carvalho de Melo" <[email protected]>
Date: Tue, 27 Mar 2007 18:56:11 -0300

Quoted 18 lines · David Miller
Quoted 17 lines

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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().

Quoted 5 lines
Quoted 2 lines

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.

#10 lore raw
Quoted 26 lines · David Miller

From: "Arnaldo Carvalho de Melo" <[email protected]>
Date: Tue, 27 Mar 2007 18:56:11 -0300

Quoted 23 lines · David Miller
Quoted 17 lines

From: Arnaldo Carvalho de Melo <[email protected]>
Date: Tue, 27 Mar 2007 16:41:48 -0300

Review

Quoted 8 lines
(quoted diff) +8 -0
+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().

Quoted 2 lines

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

author maintainer
#11 lore raw

From: "Arnaldo Carvalho de Melo" <[email protected]>
Date: Tue, 27 Mar 2007 20:07:50 -0300

Quoted 3 lines

Okay, Hairaru is this way:

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

Pulled, thanks a lot.