Commit 1db35994 authored by Igor Mitsyanko's avatar Igor Mitsyanko Committed by Kalle Valo

qtnfmac: signal that all packets coming from device are already flooded

Firmware floods all packets that need to be flooded (multicast, broadcast,
unknown unicast) as required. Tell kernel bridge subsystem it does not
need to flood packet itself by marking each incoming frame
with skb->offload_fwd_mark flag.
Signed-off-by: default avatarIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4e14e76c
......@@ -12,6 +12,7 @@
#include "cfg80211.h"
#include "event.h"
#include "util.h"
#include "switchdev.h"
#define QTNF_DMP_MAX_LEN 48
#define QTNF_PRIMARY_VIF_IDX 0
......@@ -866,6 +867,8 @@ struct net_device *qtnf_classify_skb(struct qtnf_bus *bus, struct sk_buff *skb)
}
__skb_trim(skb, skb->len - sizeof(*meta));
/* Firmware always handles packets that require flooding */
qtnfmac_switch_mark_skb_flooded(skb);
out:
return ndev;
......
/* SPDX-License-Identifier: GPL-2.0+ */
/* Copyright (c) 2019 Quantenna Communications. All rights reserved. */
#ifndef QTNFMAC_SWITCHDEV_H_
#define QTNFMAC_SWITCHDEV_H_
#include <linux/skbuff.h>
#ifdef CONFIG_NET_SWITCHDEV
static inline void qtnfmac_switch_mark_skb_flooded(struct sk_buff *skb)
{
skb->offload_fwd_mark = 1;
}
#else
static inline void qtnfmac_switch_mark_skb_flooded(struct sk_buff *skb)
{
}
#endif
#endif /* QTNFMAC_SWITCHDEV_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment