arp: Remove the arp_hh_ops structure
Subsystems (3)
PATCH 1/1 arp: Remove the arp_hh_ops structure
The arp_hh_ops structure is similar to the arp_generic_ops structure. but the latter is more general,so remove the arp_hh_ops structure.
Fix when took out the neigh->ops assignment:
8.973653] #PF: supervisor read access in kernel mode
[ 8.975027] #PF: error_code(0x0000) - not-present page [ 8.976310] PGD 0 P4D 0 [ 8.977036] Oops: 0000 [#1] SMP PTI [ 8.977973] CPU: 1 PID: 210 Comm: sd-resolve Not tainted 5.11.0-rc7-02046-g4591591ab715 #1 [ 8.979998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 8.981996] RIP: 0010:neigh_probe (kbuild/src/consumer/net/core/neighbour.c:1009)
--- net/ipv4/arp.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
net/ipv4/arp.c +2 -13
@@ -135,14 +135,6 @@ static const struct neigh_ops arp_generic_ops = { .connected_output = neigh_connected_output, }; -static const struct neigh_ops arp_hh_ops = { - .family =AF_INET , - .solicit = arp_solicit, - .error_report = arp_error_report, - .output = neigh_resolve_output, - .connected_output = neigh_resolve_output, -}; -static const struct neigh_ops arp_direct_ops = { .family =AF_INET , .output = neigh_direct_output,
@@ -277,12 +269,9 @@ static int arp_constructor(struct neighbour *neigh)memcpy (neigh->ha, dev->broadcast, dev->addr_len); } -if (dev->header_ops->cache) - neigh->ops = &arp_hh_ops; -else - neigh->ops = &arp_generic_ops; + neigh->ops = &arp_generic_ops; -if (neigh->nud_state &NUD_VALID ) +if (!dev->header_ops->cache && (neigh->nud_state &NUD_VALID )) neigh->output = neigh->ops->connected_output;else neigh->output = neigh->ops->output;
Signature · 1 line
2.29.0
Quoted 12 lines · Yejune Deng
The
arp_hh_opsstructure is similar to thearp_generic_opsstructure. but the latter is more general,so remove thearp_hh_opsstructure.Fix when took out the
neigh->opsassignment:
8.973653] #PF: supervisor read access in kernel mode[ 8.975027] #PF: error_code(0x0000) - not-present page [ 8.976310] PGD 0 P4D 0 [ 8.977036] Oops: 0000 [#1] SMP PTI [ 8.977973] CPU: 1 PID: 210 Comm: sd-resolve Not tainted 5.11.0-rc7-02046-g4591591ab715 #1 [ 8.979998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 8.981996] RIP: 0010:neigh_probe (kbuild/src/consumer/net/core/neighbour.c:1009)
I have a hard time understanding this patch submission.
This seems a mix of a net-next and net material ?
Quoted 1 line
Reported-by kernel test robot <[email protected]>
If this is a bug fix, we want a Fixes: tag
This will really help us. Please don't let us guess what is going on.
Also, if this is not a bug fix, this should target net-next tree, please take a look at Documentation/networking/netdev-FAQ.rst
In short, the stack trace in this changelog seems to be not related to this patch, maybe a prior version ? We do not want to keep artifacts of some buggy version that was never merged into official tree.
Thanks.
Quoted 40 lines
Signed-off-by Yejune Deng <[email protected]>--- net/ipv4/arp.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)net/ipv4/arp.c +2
-13@@ -135,14 +135,6 @@ static const struct neigh_ops arp_generic_ops = { .connected_output = neigh_connected_output, }; -static const struct neigh_ops arp_hh_ops = { - .family =AF_INET , - .solicit = arp_solicit, - .error_report = arp_error_report, - .output = neigh_resolve_output, - .connected_output = neigh_resolve_output, -}; -static const struct neigh_ops arp_direct_ops = { .family =AF_INET , .output = neigh_direct_output,@@ -277,12 +269,9 @@ static int arp_constructor(struct neighbour *neigh)memcpy (neigh->ha, dev->broadcast, dev->addr_len); } -if (dev->header_ops->cache) - neigh->ops = &arp_hh_ops; -else - neigh->ops = &arp_generic_ops; + neigh->ops = &arp_generic_ops; -if (neigh->nud_state &NUD_VALID ) +if (!dev->header_ops->cache && (neigh->nud_state &NUD_VALID )) neigh->output = neigh->ops->connected_output;else neigh->output = neigh->ops->output;
Quoted 16 lines · Eric Dumazet
Quoted 12 lines · Yejune Deng
The
arp_hh_opsstructure is similar to thearp_generic_opsstructure. but the latter is more general,so remove thearp_hh_opsstructure.Fix when took out the
neigh->opsassignment:
8.973653] #PF: supervisor read access in kernel mode[ 8.975027] #PF: error_code(0x0000) - not-present page [ 8.976310] PGD 0 P4D 0 [ 8.977036] Oops: 0000 [#1] SMP PTI [ 8.977973] CPU: 1 PID: 210 Comm: sd-resolve Not tainted 5.11.0-rc7-02046-g4591591ab715 #1 [ 8.979998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 8.981996] RIP: 0010:neigh_probe (kbuild/src/consumer/net/core/neighbour.c:1009)
Quoted 3 lines
I have a hard time understanding this patch submission.
This seems a mix of a net-next and net material ?
It is net-next at best.
Quoted 9 lines
Quoted 4 lines
Reported-by kernel test robot <[email protected]>If this is a bug fix, we want a Fixes: tag
This will really help us. Please don't let us guess what is going on.
This patch is a v2. v1 was clearly wrong and not tested; I responded as such 12 hours before the robot test.
Thank you for the clarification.
Quoted 36 lines · David Ahern
Quoted 16 lines · Eric Dumazet
Quoted 12 lines · Yejune Deng
The
arp_hh_opsstructure is similar to thearp_generic_opsstructure. but the latter is more general,so remove thearp_hh_opsstructure.Fix when took out the
neigh->opsassignment:
8.973653] #PF: supervisor read access in kernel mode[ 8.975027] #PF: error_code(0x0000) - not-present page [ 8.976310] PGD 0 P4D 0 [ 8.977036] Oops: 0000 [#1] SMP PTI [ 8.977973] CPU: 1 PID: 210 Comm: sd-resolve Not tainted 5.11.0-rc7-02046-g4591591ab715 #1 [ 8.979998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 8.981996] RIP: 0010:neigh_probe (kbuild/src/consumer/net/core/neighbour.c:1009)Quoted 3 lines
I have a hard time understanding this patch submission.
This seems a mix of a net-next and net material ?
It is net-next at best.
Quoted 9 lines
Quoted 4 lines
Reported-by kernel test robot <[email protected]>If this is a bug fix, we want a Fixes: tag
This will really help us. Please don't let us guess what is going on.
This patch is a v2. v1 was clearly wrong and not tested; I responded as such 12 hours before the robot test.