Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: vlan: update wrong comments

vlan_insert_tag() and friends do not allocate a new skb.
However they might allocate a new skb->head.
Update their comments to better describe their behavior.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
7740bb88 6f5ca184

+3 -3
+3 -3
include/linux/if_vlan.h
··· 408 408 * @mac_len: MAC header length including outer vlan headers 409 409 * 410 410 * Inserts the VLAN tag into @skb as part of the payload at offset mac_len 411 - * Returns a VLAN tagged skb. If a new skb is created, @skb is freed. 411 + * Returns a VLAN tagged skb. This might change skb->head. 412 412 * 413 413 * Following the skb_unshare() example, in case of error, the calling function 414 414 * doesn't have to worry about freeing the original skb. ··· 437 437 * @vlan_tci: VLAN TCI to insert 438 438 * 439 439 * Inserts the VLAN tag into @skb as part of the payload 440 - * Returns a VLAN tagged skb. If a new skb is created, @skb is freed. 440 + * Returns a VLAN tagged skb. This might change skb->head. 441 441 * 442 442 * Following the skb_unshare() example, in case of error, the calling function 443 443 * doesn't have to worry about freeing the original skb. ··· 457 457 * @vlan_tci: VLAN TCI to insert 458 458 * 459 459 * Inserts the VLAN tag into @skb as part of the payload 460 - * Returns a VLAN tagged skb. If a new skb is created, @skb is freed. 460 + * Returns a VLAN tagged skb. This might change skb->head. 461 461 * 462 462 * Following the skb_unshare() example, in case of error, the calling function 463 463 * doesn't have to worry about freeing the original skb.