mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_main.c drivers/net/usb/r8152.c All three conflicts were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
30d0844bdc
154 changed files with 1455 additions and 618 deletions
|
@ -651,6 +651,23 @@ void make_flow_keys_digest(struct flow_keys_digest *digest,
|
|||
}
|
||||
EXPORT_SYMBOL(make_flow_keys_digest);
|
||||
|
||||
static struct flow_dissector flow_keys_dissector_symmetric __read_mostly;
|
||||
|
||||
u32 __skb_get_hash_symmetric(struct sk_buff *skb)
|
||||
{
|
||||
struct flow_keys keys;
|
||||
|
||||
__flow_hash_secret_init();
|
||||
|
||||
memset(&keys, 0, sizeof(keys));
|
||||
__skb_flow_dissect(skb, &flow_keys_dissector_symmetric, &keys,
|
||||
NULL, 0, 0, 0,
|
||||
FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL);
|
||||
|
||||
return __flow_hash_from_keys(&keys, hashrnd);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__skb_get_hash_symmetric);
|
||||
|
||||
/**
|
||||
* __skb_get_hash: calculate a flow hash
|
||||
* @skb: sk_buff to calculate flow hash from
|
||||
|
@ -868,6 +885,29 @@ static const struct flow_dissector_key flow_keys_dissector_keys[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct flow_dissector_key flow_keys_dissector_symmetric_keys[] = {
|
||||
{
|
||||
.key_id = FLOW_DISSECTOR_KEY_CONTROL,
|
||||
.offset = offsetof(struct flow_keys, control),
|
||||
},
|
||||
{
|
||||
.key_id = FLOW_DISSECTOR_KEY_BASIC,
|
||||
.offset = offsetof(struct flow_keys, basic),
|
||||
},
|
||||
{
|
||||
.key_id = FLOW_DISSECTOR_KEY_IPV4_ADDRS,
|
||||
.offset = offsetof(struct flow_keys, addrs.v4addrs),
|
||||
},
|
||||
{
|
||||
.key_id = FLOW_DISSECTOR_KEY_IPV6_ADDRS,
|
||||
.offset = offsetof(struct flow_keys, addrs.v6addrs),
|
||||
},
|
||||
{
|
||||
.key_id = FLOW_DISSECTOR_KEY_PORTS,
|
||||
.offset = offsetof(struct flow_keys, ports),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct flow_dissector_key flow_keys_buf_dissector_keys[] = {
|
||||
{
|
||||
.key_id = FLOW_DISSECTOR_KEY_CONTROL,
|
||||
|
@ -889,6 +929,9 @@ static int __init init_default_flow_dissectors(void)
|
|||
skb_flow_dissector_init(&flow_keys_dissector,
|
||||
flow_keys_dissector_keys,
|
||||
ARRAY_SIZE(flow_keys_dissector_keys));
|
||||
skb_flow_dissector_init(&flow_keys_dissector_symmetric,
|
||||
flow_keys_dissector_symmetric_keys,
|
||||
ARRAY_SIZE(flow_keys_dissector_symmetric_keys));
|
||||
skb_flow_dissector_init(&flow_keys_buf_dissector,
|
||||
flow_keys_buf_dissector_keys,
|
||||
ARRAY_SIZE(flow_keys_buf_dissector_keys));
|
||||
|
|
|
@ -3016,24 +3016,6 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(skb_append_pagefrags);
|
||||
|
||||
/**
|
||||
* skb_push_rcsum - push skb and update receive checksum
|
||||
* @skb: buffer to update
|
||||
* @len: length of data pulled
|
||||
*
|
||||
* This function performs an skb_push on the packet and updates
|
||||
* the CHECKSUM_COMPLETE checksum. It should be used on
|
||||
* receive path processing instead of skb_push unless you know
|
||||
* that the checksum difference is zero (e.g., a valid IP header)
|
||||
* or you are setting ip_summed to CHECKSUM_NONE.
|
||||
*/
|
||||
static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)
|
||||
{
|
||||
skb_push(skb, len);
|
||||
skb_postpush_rcsum(skb, skb->data, len);
|
||||
return skb->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_pull_rcsum - pull skb and update receive checksum
|
||||
* @skb: buffer to update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue