Skip to content

Commit 030feea

Browse files
committed
netfilter: flowtable: remove hw_ifidx
hw_ifidx was originally introduced to store the real netdevice as a requirement for the hardware offload support in: 73f9702 ("netfilter: nft_flow_offload: use direct xmit if hardware offload is enabled") Since ("netfilter: flowtable: consolidate xmit path"), ifidx and hw_ifidx points to the real device in the xmit path, remove it. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 18d27be commit 030feea

4 files changed

Lines changed: 1 addition & 6 deletions

File tree

include/net/netfilter/nf_flow_table.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ struct flow_offload_tuple {
146146
};
147147
struct {
148148
u32 ifidx;
149-
u32 hw_ifidx;
150149
u8 h_source[ETH_ALEN];
151150
u8 h_dest[ETH_ALEN];
152151
} out;

net/netfilter/nf_flow_table_core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ static int flow_offload_fill_route(struct flow_offload *flow,
127127
memcpy(flow_tuple->out.h_source, route->tuple[dir].out.h_source,
128128
ETH_ALEN);
129129
flow_tuple->out.ifidx = route->tuple[dir].out.ifindex;
130-
flow_tuple->out.hw_ifidx = route->tuple[dir].out.hw_ifindex;
131130
dst_release(dst);
132131
break;
133132
case FLOW_OFFLOAD_XMIT_XFRM:

net/netfilter/nf_flow_table_offload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ static void flow_offload_redirect(struct net *net,
555555
switch (this_tuple->xmit_type) {
556556
case FLOW_OFFLOAD_XMIT_DIRECT:
557557
this_tuple = &flow->tuplehash[dir].tuple;
558-
ifindex = this_tuple->out.hw_ifidx;
558+
ifindex = this_tuple->out.ifidx;
559559
break;
560560
case FLOW_OFFLOAD_XMIT_NEIGH:
561561
other_tuple = &flow->tuplehash[!dir].tuple;

net/netfilter/nf_flow_table_path.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ static int nft_dev_fill_forward_path(const struct nf_flow_route *route,
7575
struct nft_forward_info {
7676
const struct net_device *indev;
7777
const struct net_device *outdev;
78-
const struct net_device *hw_outdev;
7978
struct id {
8079
__u16 id;
8180
__be16 proto;
@@ -159,7 +158,6 @@ static void nft_dev_path_info(const struct net_device_path_stack *stack,
159158
}
160159
}
161160
info->outdev = info->indev;
162-
info->hw_outdev = info->indev;
163161

164162
if (nf_flowtable_hw_offload(flowtable) &&
165163
nft_is_valid_ether_device(info->indev))
@@ -212,7 +210,6 @@ static void nft_dev_forward_path(struct nf_flow_route *route,
212210
if (info.xmit_type == FLOW_OFFLOAD_XMIT_DIRECT) {
213211
memcpy(route->tuple[dir].out.h_source, info.h_source, ETH_ALEN);
214212
memcpy(route->tuple[dir].out.h_dest, info.h_dest, ETH_ALEN);
215-
route->tuple[dir].out.hw_ifindex = info.hw_outdev->ifindex;
216213
route->tuple[dir].xmit_type = info.xmit_type;
217214
}
218215
}

0 commit comments

Comments
 (0)