[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2380a961-ca3e-7693-fc90-11a0a5aa454b@nbd.name>
Date: Fri, 31 Mar 2023 23:01:20 +0200
From: Felix Fietkau <nbd@....name>
To: Simon Horman <simon.horman@...igine.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v3 net-next 1/2] net: ethernet: mtk_eth_soc: add code for
offloading flows from wlan devices
On 31.03.23 22:38, Simon Horman wrote:
> On Fri, Mar 31, 2023 at 02:47:06PM +0200, Felix Fietkau wrote:
>> WED version 2 (on MT7986 and later) can offload flows originating from
>> wireless devices.
>> In order to make that work, ndo_setup_tc needs to be implemented on the
>> netdevs. This adds the required code to offload flows coming in from WED,
>> while keeping track of the incoming wed index used for selecting the
>> correct PPE device.
>>
>> Signed-off-by: Felix Fietkau <nbd@....name>
>
> ...
>
>> diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
>
> ...
>
>> +static int
>> +mtk_eth_setup_tc_block_cb(enum tc_setup_type type, void *type_data, void *cb_priv)
>> +{
>> + struct flow_cls_offload *cls = type_data;
>> + struct mtk_mac *mac = netdev_priv(dev);
>
> This does not compile because dev is undefined at this point.
Yes, I had fixed that, but forgot to amend the commit before sending it
out. Sorry about that.
> ...
>
>> +static int
>> +mtk_wed_setup_tc_block(struct mtk_wed_hw *hw, struct net_device *dev,
>> + struct flow_block_offload *f)
>> +{
>> + struct mtk_wed_flow_block_priv *priv;
>> + static LIST_HEAD(block_cb_list);
>> + struct flow_block_cb *block_cb;
>> + struct mtk_eth *eth = hw->eth;
>> + bool register_block = false;
>
> gcc-12 with W=1 tellsme that register_block is unused.
> It should be removed.
Right. Will send v4 tomorrow.
Thanks,
- Felix
Powered by blists - more mailing lists