When trying to add a GID to a full GID table or when trying
to delete a GID which is not in the GID table an error will
be printed to the kernel log.
Signed-off-by: Moni Shoua <monis@mellanox.co.il>
(Ported from Mellanox OFED 2.4)
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
}
}
+ if (found == -1 && !clear && free < 0) {
+ pr_err("GID table of port %d is full. Can't add %pI6\n",
+ port, gid);
+ return -ENOMEM;
+ }
+ if (found == -1 && clear) {
+ pr_err("%pI6 is not in GID table of port %d\n", gid, port);
+ return -EINVAL;
+ }
if (found == -1 && !clear && free >= 0) {
dev->iboe.gid_table[port - 1][free] = *gid;
need_update = 1;