Commit 144d4c9e authored by Baowen Zheng's avatar Baowen Zheng Committed by David S. Miller
Browse files

flow_offload: reject to offload tc actions in offload drivers



A follow-up patch will allow users to offload tc actions independent of
classifier in the software datapath.

In preparation for this, teach all drivers that support offload of the flow
tables to reject such configuration as currently none of them support it.

Signed-off-by: default avatarBaowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 40bd094d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1962,7 +1962,7 @@ static int bnxt_tc_setup_indr_cb(struct net_device *netdev, struct Qdisc *sch, v
				 void *data,
				 void (*cleanup)(struct flow_block_cb *block_cb))
{
	if (!bnxt_is_netdev_indr_offload(netdev))
	if (!netdev || !bnxt_is_netdev_indr_offload(netdev))
		return -EOPNOTSUPP;

	switch (type) {
+3 −0
Original line number Diff line number Diff line
@@ -517,6 +517,9 @@ int mlx5e_rep_indr_setup_cb(struct net_device *netdev, struct Qdisc *sch, void *
			    void *data,
			    void (*cleanup)(struct flow_block_cb *block_cb))
{
	if (!netdev)
		return -EOPNOTSUPP;

	switch (type) {
	case TC_SETUP_BLOCK:
		return mlx5e_rep_indr_setup_block(netdev, sch, cb_priv, type_data,
+3 −0
Original line number Diff line number Diff line
@@ -1867,6 +1867,9 @@ nfp_flower_indr_setup_tc_cb(struct net_device *netdev, struct Qdisc *sch, void *
			    void *data,
			    void (*cleanup)(struct flow_block_cb *block_cb))
{
	if (!netdev)
		return -EOPNOTSUPP;

	if (!nfp_fl_is_netdev_to_offload(netdev))
		return -EOPNOTSUPP;