diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-08-14 15:33:54 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-08-14 15:33:54 -0400 |
| commit | e9ffb3d7ec94083a44a8721681391beca2ffd68c (patch) | |
| tree | 6768ab487b3f44c2a4995ee61307e47760ca9b88 /include/linux/skbuff.h | |
| parent | 8b9411014e6f18a883c18b38f41338dbd53fddea (diff) | |
| parent | e9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 19c96d498e20..755e9cddac47 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1040,6 +1040,21 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len) | |||
| 1040 | } | 1040 | } |
| 1041 | 1041 | ||
| 1042 | /** | 1042 | /** |
| 1043 | * pskb_trim_unique - remove end from a paged unique (not cloned) buffer | ||
| 1044 | * @skb: buffer to alter | ||
| 1045 | * @len: new length | ||
| 1046 | * | ||
| 1047 | * This is identical to pskb_trim except that the caller knows that | ||
| 1048 | * the skb is not cloned so we should never get an error due to out- | ||
| 1049 | * of-memory. | ||
| 1050 | */ | ||
| 1051 | static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len) | ||
| 1052 | { | ||
| 1053 | int err = pskb_trim(skb, len); | ||
| 1054 | BUG_ON(err); | ||
| 1055 | } | ||
| 1056 | |||
| 1057 | /** | ||
| 1043 | * skb_orphan - orphan a buffer | 1058 | * skb_orphan - orphan a buffer |
| 1044 | * @skb: buffer to orphan | 1059 | * @skb: buffer to orphan |
| 1045 | * | 1060 | * |
| @@ -1081,7 +1096,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
| 1081 | * the headroom they think they need without accounting for the | 1096 | * the headroom they think they need without accounting for the |
| 1082 | * built in space. The built in space is used for optimisations. | 1097 | * built in space. The built in space is used for optimisations. |
| 1083 | * | 1098 | * |
| 1084 | * %NULL is returned in there is no free memory. | 1099 | * %NULL is returned if there is no free memory. |
| 1085 | */ | 1100 | */ |
| 1086 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1101 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
| 1087 | gfp_t gfp_mask) | 1102 | gfp_t gfp_mask) |
| @@ -1101,7 +1116,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | |||
| 1101 | * the headroom they think they need without accounting for the | 1116 | * the headroom they think they need without accounting for the |
| 1102 | * built in space. The built in space is used for optimisations. | 1117 | * built in space. The built in space is used for optimisations. |
| 1103 | * | 1118 | * |
| 1104 | * %NULL is returned in there is no free memory. Although this function | 1119 | * %NULL is returned if there is no free memory. Although this function |
| 1105 | * allocates memory it can be called from an interrupt. | 1120 | * allocates memory it can be called from an interrupt. |
| 1106 | */ | 1121 | */ |
| 1107 | static inline struct sk_buff *dev_alloc_skb(unsigned int length) | 1122 | static inline struct sk_buff *dev_alloc_skb(unsigned int length) |
